.net - Why Does A Large Amount Of AppSettings Calls To A None Existent Key Cause Application Crashes

May 23, 2012

There is a very strange problem with a Windows Service I am working on that I would like to understand why it occurs. The service loops every 5 minutes and then within that loop it loops through keys containing webservice URLs that are numbered such as:

<add key="URL.1" value="http://dummy1.com/Service.asmx"/>
<add key="URL.2" value="http://dummy2.com/Service.asmx"/>
<add key="URL.3" value="http://dummy3.com/Service.asmx"/>

The code that does this check is:

If String.IsNullOrEmpty(AppSettings("OM." & intCount & ".Name").ToString) Then

When it hits a key that doesn't exist an exception is thrown and the service stops and waits for 5 minutes until the next loop.This usually works great but every week or two the Windows service will crash on that line without any Exception. The application log has a line from before that line but nothing after, none of the Try Catches are hit (the main one is catching the base "Exception" class).In the Event Log for Windows is the following:

Faulting application name: MyService.exe, version: 1.1.2.0, time stamp: 0x4fa22a24
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e211319
Exception code: 0xe053534f

[code]....

The weird part is that this line of code is executing fine 300 times a day for at least a week which is around 2000 times before that one time it causes a full crash of the application. why this is occurring? I have changed that line of code to not rely on Exceptions and it has been working fine for a week now with no crash so could be something to do with too many Exceptions - maybe causing a stack overflow?

View 1 Replies


ADVERTISEMENT

IDE :: Large List Crashes When Added To Project

Apr 12, 2011

I have a very simple class that crashes the VB.NET IDE when I added this list. Granted this is a list with 10,000 items but it crashes when I added it to the project. When I delete it with a text editor outside the project does not crash. I have not installed SP1 based on the comments not sure if this is a know problem or not. I can post the project its fairly small as its just text.

Private Shared ReadOnly _mdmCodes As List(Of [String]) = New List(Of String)() From { _
"AAAE-24422", _
"AAFP-02872", _
"AAGG-25572", _
"AAGN-16807", _..........

View 4 Replies

Generating A Rather Large Memory Leak - Every 5 Seconds It Calls CheckSettings

Sep 19, 2009

I seem to be having some issues with my code here. The sub "CheckSettings" is actually run off of a system timer, so that every 5 seconds it calls CheckSettings (actually, i set it to every 1 second for debugging, so i can see the leak a little more clearly by monitoring the process). CheckSettings basically checks to ensure there isn't already an instance of the thread running, and if there is, it checks to ensure that the instance has completed running ... once it has the go ahead, it creates a new thread and runs again.

code:

This code is creating a very large memory leak. After a few minutes of running, my application goes from a memory footprint of about 45,000 K to about 1,000,000 K. Quite the leak. I read some articles on the managed versus unmanaged memory etc, and I was careful to free the objects etc.

View 3 Replies

Large Amount Of Data In ComboBox?

Aug 6, 2009

I'm searching the same title "Large amount of data in ComboBox" last 1 and half years but I could not get what I'm expecting! Here is my case, I have 20 thousand unique products, I just fill into dataset & bind only two columns in the combobox for searching & validating the product if it is exist in the product list or not.

1) I read about dataset but all articles are described "Dataset only for few records because it is sitting in-memory". If I fill few records (100 or 1000 products) into the dataset, how can I search & validate REMAINING (NOT FILLED) products?

2) Is there anyother way without filling into dataset and bind to combobox? Can anyone suggest me which is suitable for me?

View 14 Replies

Large Amount Of Image Files For App?

Jun 19, 2010

Just a doubt: if I have large amount of image files for my app, is it ok to store them in the resource file ?

Will those files be saved in a single resource file ? Will that cause any problem to the performance of my app ? When I try to access a image file from the resource using code, will it load that file only into the memory or the entire image contents from the resource file ?

View 4 Replies

Picturebox Using Large Amount Of Memory

Dec 31, 2008

I'm loading an image, then getting size and such info from it, and loading the image into a picture box. Now it works and all, but I noticed it uses a large amount of memory. I'm doing: img = Image.FromFile(file)Where I load the image, 'file' being just a string containing path to an image on the hd. After that, I get the size and frame count (if any), and load it into a picture box: The image I've been testing with, is a 6600x5100 3.5MB JPEG, which can be downloaded from url...Watching task manager, when the app loads the image, it takes up about 104MB of memory. I've tried doing img.Dispose after the above line, but it brings up an error. If I put a button on the form with img.Dispose in it, and click it after app has loaded, it drops down to about 6MB of memory used. Loading the image directly into the picture box using .Load or .LoadAsync, after disposing img beforehand, still ends up with a huge amount of memory used.

So I'm wondering if theres a way to check if the picture box has fully loaded the img, so then I can Dispose the img and free up the memory. Or maybe a better way all together of loading an image into a picture box, and/or getting size & frame count, without having to use up that amount of memory before freeing.

View 2 Replies

Xml And Storing Large Amount Data?

Jul 22, 2009

I'm working on a project at the moment, where all the data being loaded is kept in an XML file which until now have been rather clean with structures such as

Code:
<Textures>
<Texture id="1">TerraingrassDirtNW.png</Texture>

[code].....

View 2 Replies

Add Application Name To <appSettings/>?

Jan 1, 2012

This is my app.config file looks like[code]...

To be more short and clear I need to enter the above shown User details to my database using the HDI membership provider.

View 3 Replies

Compute Hash On Large Amount Of Data?

Jan 31, 2011

I tried to follow this advice, but I still run out of memory.

[URL]

Basically, I am reading all the bytes of a 1 gb disk and I want to try and do a md5 hash on it. However, when following this example, my cryptostream gets too large a System out of memory exception.

Is there another way to do the md5 hash over some much data?

I am currently reading it into 10 million bytes arrays at a time. Can I hash the first array, and then use it as a seed for the next array, and so one, like you might do to a CRC32 calculation?

View 2 Replies

Display A Large Amount Of Data In Gridview?

Jan 7, 2011

I am trying to show a large amount of data in gridview but the problem is that everytime data increase the gridview row size increase automatically.

View 4 Replies

Display Large Amount Of Fixed Text?

Nov 22, 2009

How do I display a large amount of fixed text (about 400 words) in a form. I also need to have scroll down bars.[code]...

View 1 Replies

VS 2005 Dealing With Large Amount Of Records?

May 21, 2009

I am making an inventory program in which there's an ItemMaster and Sales Form. Currently there are 15000 records of items(increasing daily). I want to display all the items in the sales form so that the user can select an item from the list for billing, and also in the itemmaster so that if the user wants to edit any item then he can select it from the list.

I can make a common list form for both sales and master, but i have to load the data from the database into the list every time the list is displayed(which is taking lot of time), so is there an better way to do it.

View 8 Replies

VS 2008 - Sorting Large Amount Of Records

Nov 24, 2009

The code below put in the DB 0 in a few fields...Normally the query sort a large amount of records and off course the code take a little time to do the job...My question is simple...This is another way to get more fast this job?

Dim con As New OleDb.OleDbConnection
Dim ds As New DataSet
Dim sql As String
con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = " & drive & IDempresa
con.Open()
[Code] .....

View 8 Replies

Access An Appsettings Key Value In .net 2.0 Web Application?

Jun 17, 2011

I've trying to access an appsettings key value in my vb.net 2.0 web application.I've put the key in the app.config file:

<appSettings>
<add key="DownloadURL" value="http://<myURL>/" />
</appSettings>

I've followed the instructions here, and it says that I need to access this key like so:

URL = System.Configuration.ConfigurationSettings.AppSettings("DownloadURL")

But I get the following message:

Public Shared Readonly property
AppSettings() As
'System.Collections.Specialized.NameValueCollection'

[code]....

I tried to replace the old method with the new one, but it does not exist.Strange, since I've done a similar thing with a web app and it did exist there.

View 1 Replies

Develop An App That Will Export A Large Amount Of Zip Files All Of Which Have The Same Single File In Them?

Nov 21, 2009

I am trying to develop an app that will export a large amount of zip files all of which have the same single file in them - simply named 'dw' (with no extension). They will all be in the same directory. I want the file 'dw' to be renamed to the zip file name + .tif. (I will actually eventually need for this to use the magic number to determine if the file is a .tif or a .rtf.) I have been able to get it to cycle through, if the file is NOT renamed. I seem to run into issues when I want the file renamed. It just creates the first .tif file and thats it. I think its actually just cycling through but everything is getting that same name. For the record i am not a programmer by trade, just trying to help with something at work - thus I know the code I have peiced together probably isn't 'by the book'

Dim p As New ProcessStartInfo(ByVal unzipit As String, ByVal zipdir As String, ByVal arg As String, ByVal arg2 As String)
Dim di As System.IO.DirectoryInfo
di = New System.IO.DirectoryInfo(zipdir)
For Each diar In di.GetFiles()

[code]....

View 1 Replies

VS 2008 Count A Large Amount Numbers In Short Time?

Nov 23, 2010

I need to count a large amount numbers in short time.As a result the CPU jumps to 40-60% on 4-core PC.Which is extremely high.I have any idea that will lock up the thread for some time, but not actually slow or reduce the amount of files that are allowed to be counted per a giving time period.

Vb.net
Application.DoEvents()
Threading.Thread.Sleep(1000)

View 9 Replies

Sql - Visual Studio 2010 Crashes After Pasting A Large Multi-line String (Approximately 1500 Lines)

Jun 4, 2012

I am creating a VB application in Visual Studio 2010 that installs some SQL stored procedures. These stored procedures are encrypted otherwise I would just supply my clients with .sql files to create the stored procedures.

The install script that creates the stored procedure is 1500 lines in length and has been formatted in the way VS 2010 requires multi-line literals to be in:

"First Line" & _
"Second Line" & _
"etc..."

[Code]....

View 1 Replies

Create A Large Amount Of Files All Copied From A Single Original File?

Apr 15, 2012

I am wanting to create a large amount of files all copied from a single original file. I then have a list of names in a listbox that each of of these files will rename to. However I am getting an error saying that the file already exists in the save location even though the files are saving to a totally different folder...

code below.

Dim Counter As Integer = listFileNames.Items.Count
Do Until Counter = 0
System.IO.File.Move(txtOpen.Text, txtSave.Text)

[Code]....

View 1 Replies

HTTP 404 Not Found Error On Web Service Call, Only With Large Amount Of Data

Sep 2, 2011

I have a vb.net Windows application that calls a vb.net Web Service function. Both the vb.net application and Web Service have been in use for over 5 years and have worked well. The Windows App builds a text file consisting of a number of inserts into an Oracle table, followed by a call to an Oracle package. The Web Service call uploads the text file to the Web Server, loops through the statements in the text files and executes them. It then does a Select statement to put the resultant data in a string which is passed back to the calling program. We have both people on our local area network as well as external users where the call to the Web Server is over the internet.

The data string returned is the pricing for each of the lines inserted in the text file, separated by asterisks. Normal use of this call has anywhere from 1 to a few dozen lines, and the program works fine for this for both internal and external users.

Our problem right now is one external person is attempting to price a job with 491 individual line items. At first it would not price, whether the job was priced from a computer at the customers site or one of our internal people on the LAN. The problem turned out to be the timeout value was not long enough (it was set at 2 minutes, this job takes 5 minutes) so changing both the Timeout value in the Web Service call as well the httpRuntime executionTimeout value in the web.config file on the web server addressed the problem, but only for our internal users on the LAN. Our external customer wants to be able to price jobs of this size going forward, and I am at a loss as to why it errors on internet connected machines but not locally connected machines. Our customer is in New York, We are in Wisconsin, and I am able to recreate the error condition from my home computer.

The other thing is, if I create a VPN connection to our server from my computer at home, this job will price (again, it takes about 5 minutes) but if I disconnect the VPN connection, it gets an error after approximately 3 minutes, http 404: Not Found.The customer can otherwise price all of his other jobs with no problems, it's only this one, very large job that gets the error.

View 4 Replies

Show A Large Amount Of Data That Spans Across Multiple Forms And Text Boxes?

Jan 15, 2011

I am trying to find a way to show a large amount of data that spans across multiple forms and text boxes. I am making a somewhat summery of the input strings.

View 3 Replies

Application Crashes After Few Hours?

Mar 27, 2011

I am writing a system that utilizes the Timer to execute a command after an interval of three seconds. The command is to send a trigger to my RFID reader and hence the program will then decode the received data and changed it to information. It runs fine for the first few hours, but it will crash after that and the error given is an "System.NullReferenceExeption - Object reference not set to an instance of an object." error. Initially, i thought that it might be something that relates to my comobobox selected index change event that might be causing the crashes, but yet the application is crashes after i removed the section.

I fail to find the reason of the crash, even after spend fewing days finding the memory leak or some other events that might cause the crash.

I have insert TRY CATCH METHOD, just to catch the exeption error message that might cause by one of the codes, but still it doesnt show me.

View 1 Replies

Application Crashes For Other Users

Jun 8, 2010

I recently finished an application which I spent a long time making, but when I sent it to my friends so they could beta test, everyone single one of them said it stopped responding on start up. I took the .exe out of the project>bin>debug>application.exe and thats what I gave them, and it doesn't crash for me, so i was wondering what might be causing it to crash, or if they would need extra files for it to work properly?

Also, when my friend opened it, he says he got an error that says:
Name: Microsoft .NET Error

View 1 Replies

Application Crashes On Client?

Nov 2, 2009

I have created a program in Visual Basic 2008 Express Edition, and it runs fine on my computer, but on client computers (which do have the .NET |Framework installed), it crashes. I have ran Win dbg, and it says the program encountered a break instruction exception. I have googled a lot, but can't make the program work on client computers.

View 6 Replies

Console Application Crashes?

Apr 24, 2012

i have created a very simple console application in vb.net that emails me some info from the db daily. everythign works in my dev environment, however when i move it out to production and try to run the executable, i get the following error message:"A problem caused the program to stop working correctly. please close the program"i have put in some exception checks in the code:

Dim output As String
Try
output = FormatIndividualRecords(False)

[code].....

View 1 Replies

Win32 API - Equivalent To Making System Calls Abd And Library Calls In UNIX?

May 8, 2010

What the Win32 API is? I have looked around but no where really outlines what it is. Is it basically a set of procedures, outlined by Microsoft for programmers in order to get services from the operating system? In essence is it the equivalent to making system calls abd and library calls in UNIX? And yes I now Windows makes library calls too.

View 2 Replies

Application Crashes When Use MSFlexgrid In 64 Mode?

May 21, 2010

In my application (VB2008),I am using MS flex grid and it was workingfine on 32bit mode. When I tried to compile the same code base in 64 bit ,it crashes the application.

View 2 Replies

Application Crashes Without Specific Error

Oct 16, 2010

I developed one application in VB.Net 2010. It worked fine on my laptop.[code]...

View 1 Replies

VB Application Crashes When Trying To Show The Next Form

May 21, 2009

I have a VB application in .NET Framework 2.0 and I'm using VS 2008 Professional for development. The application is running without any problem on some PCs and it's not running on one of the PCs. To make sure that nothing is wrong with the that specific PC, I tried to reproduce the issue on my machine. So I formatted my PC and reinstalled everything. After installing .NET Framework and required drivers, the ran the application i got the same error. Then I installed VS 2008 and open the project to debug my code and then I realized that the exception is being thrown on this line:

********************************
Private Sub btnEnterRecords_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEnterRecords.Click
' Dim frmNext As New frmIncident()

[Code].....

View 1 Replies

32 Bit Application Crashes When Exiting On Windows 2008 64 Bit

Jan 4, 2011

We have an application that works well on XP/Pro, Vista, Windows 7, Windows 2003 Server, Windows 2008 Server (32 bit) but is problematic on Windows 2008 Server (64 bit). The application uses an unsigned activeX control which may or may not be related to the problem. To install we need to add the program name and regsvr32 as DEP exceptions. Once that is done the application installs correctly and operates normally except when the application closes.

If a user clicks the 'exit' button our code basically says 'unload me' (where me = the main form of the application) and there is no code in the form_unload section of the program.

Everything works well on every Windows platform except Win 2008 64 bit where we get

APPCRASH
Application Name: PDFPrint.exe
Application Version: 10.10.0.18
Application Timestamp: 4d238253

[Code].....

After we continue to close the program we see a message box with run time error 216 at 00002B24 message.

View 2 Replies

Application Crashes At Run Laptop, But Works On Netbook?

Jul 2, 2010

I seem to have a problem with an application i made. I hope you can help me with this as it has puzzled me for awhile now.

[Code]...

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved