.net - Identify Memory Leaks In Windows Application Using Sql Server 2005?

Dec 15, 2010

what is the best way to identify memory leaks from a vb.net 3.5 windows application.

View 1 Replies


ADVERTISEMENT

Necessary To Detach Event Handlers To Ensure That Memory Is Cleaned Up And That There Are Not Memory Leaks?

Jan 20, 2010

I have a BackgroundWorker object that I instantiated to perform a DB process on a background thread ansynchronously. I have event handlers for DoWork and RunWorkerCompleted. I can tell that the BackgroundWorker is disposing of itself because I added a message box into the Disposed event handler.Is it necessary to detach the event handlers to ensure that the memory is cleaned up and that there are not memory leaks?

View 1 Replies

Thread And Memory Leaks - Memory Usage Jumps About 1000k And It Never Goes Back Down

Apr 17, 2011

I've noticed that every time I start a new thread in my program, the memory usage jumps about 1000k and it never goes back down. I have ensured that the thread is no longer running, and only one instance of my worker thread is ever running at a time. I am using ThreadPool.QueueUserWorkItem and ASyncOperation to get stuff done. The program starts using a Sub Main in a module that uses STAThread; I read that using STAThread instead of MTAThread makes it impossible for the Garbage Collector to get in and consider objects for garbage collection. However, when I change the STAThread to an MTAThread, the WebBrowser control in my frmMain cannot be instantiated.

I get this exception:

Code: An unhandled exception of type 'System.Threading.ThreadStateException' occurred in System.Windows.Forms.dll

Additional information: ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded apartment. I do threading with the WebBrowser control, so will using MTAThread fix my problem? If so, how should I partition my code so that the WebBrowser control won't be affected by the above exception? I call the thread repeatedly with a timer (although only one instance ever runs at a time), and my program's memory usage starts at about 5000k and can jump to 300,000k+ depending on many times the thread needs to be called.

View 6 Replies

Memory Leaks With Unmanaged Callbacks?

Jan 28, 2009

I've been using a simple mouse hook and some accessiblity api stuff to retreive caption under mouse (ObjectFromPoint) and accessibility api for events (ObjectFromEvent).It seems like there is memory leaks with unmanaged callbacks.With the global mouse hook it seems there is 4 - 8k of ram added every time the mouse is just moved even though I only monitor mousedown and mouseup with:

Private Const WM_LBUTTONDOWN As UInteger = &H201
Private Const WM_LBUTTONUP As UInteger = &H202
Private Const WM_MBUTTONDOWN As UInteger = &H207

[code]....

And with accessibility it seems there is also memory issues with my code. Is this to do with delegates?I only managed to find one mention on the mouse hook issues which led me in to a dead end.A long shot and maybe not even needed but I was wondering, if these mem leaks can't be stopped, would it free up the memory if I used threads which could be exited and new ones started eg.mem usage 3000k of which 1000k is leaked mem (for round figures) I exit global mouse hook thread and start a new m-hook thread.would this free up the memory? If so, how would i do this, not use threading before.

View 4 Replies

Events And Why RemoveHandler Is Required For Memory Leaks

Feb 18, 2010

I have attempted to understand the behind-the-scenes stuff for Events several times. I must have read at least a dozen articles but there is still some ambiguity in my head.

[Code]...

View 5 Replies

Write Functions In Microsoft.NET (VB) To Avoid Memory Leaks?

May 8, 2012

What is the best way to write functions in Microsoft.NET (VB) to avoid memory leaks. I have always followed this style:

Public Sub TestMemoryLeak()
Dim testCon As SqlConnection
Try

[code].....

Here the connection reference is created before the TRY clause and is initialised after the TRY clause. I believe the connection is always closed and dereferenced even if an exception is thrown. Is this good practice? I see a lot of code that creates references and dereferences in the TRY clause, but this would mean that the memory is not correctly handled if an exception is thrown. Some developers say they don't like to clean up in the finally clause.

View 1 Replies

How To Load A .bak File Of Database Backup In Sql Server 2005 Using .net 2008 Windows Application

Mar 12, 2009

how to load a .bak file of database backup in sql server 2005 using vb.net 2008 windows application?

View 5 Replies

Application.ThreadExit Leaks?

Jan 1, 2010

from the vb web:

Quote:
Caution:

Because this is a static event, you must detach your event handlers when your application is disposed, or memory leaks will result.my interpretation is that "detach your event handlers" only means those that i've added using AddHandler? the ones using Handles keyword will be safe right?

View 3 Replies

Sockets + Windows Server 2008 = Memory Leak?

Jan 29, 2010

We have a small service shows continuous nonpaged pool bytes increase from the moment it is started. This is only on a 2008 server (all the others work fine).

The service basically connects a socket to a client to see if it's successful and then closes (most code omitted):

[Code]...

View 3 Replies

Memory Leak In Program - Server (Windows 2003) Is Crashing?

Feb 5, 2010

working on an application which performs a set of operations on Active Directory based on an op code.The application was developed long back and has been working fine. I recently made few changes, which is causing the Server to run out of memory whenever the program is being run. I also modified the code to make sure that the variables being declared in each function are set to "Nothing" at the end of function so that the memory can be collected by garbage collector. To make sure, I'm also forcing garbage collection to take place at different parts of the program. But, I still continue to have the issue. The program is very big and hence I could not upload it.

The code retrieves a list of rows from a table with opcodes in it and based on operation code, it performs a set of tasks. The problem is that when it loops through each row in the table, the size of memory required by the program keeps increasing (> 1 GB) to the point where the Server (Windows 2003) is crashing. I have tried different profiling tools, but none of them have been able to detect any memory leaks in the program. I'm guessing that the resources are being held up and hence causing this issue.

View 7 Replies

Reduce Memory In Windows Application?

Sep 24, 2010

I am working on VB.net multiuser application and when ever my any form open up memory rise and after some time out of memory exception is come.

I am working on VB.net 2008 and sqlserver 2005. I have use very much of shared object so second time it memory allocation is less, but how i can reduce it when form is close or not in use. can i use Garbage collector or Dispose and how i use this functionality ?

View 3 Replies

SQL Server 2008 Configuration For Client Server (Windows Form) Application

Apr 6, 2012

Case : I'm creating an application (desktop application) with VB.NET (actually windows form), and using SQL Server Express 2008 for its database.

[Code]...

View 1 Replies

[2005] Read The Email From The Mail Server That Is In An Intranet From An Application Server?

Jun 4, 2008

I need to read the email from the mail server that is in my intranet from my application server.

View 9 Replies

C# - Windows Form + Database (Sql Server)+ Windows Mobile Application?

Mar 17, 2011

i am doing project of Order Accepting system for five star hotels.Scenario is Waiter will accept order using Window Mobile which is Connected to WiFi present in hotel.I want to communicate to database(Sql Server) present on My Machine (Computer present in kitchen) through WiFi and Add order into table present inside database. This should notify my application present on Compter and should print order. After completion of Order Application from kitchen will notify to waiter about completion. My problem is How to Communicate with database present on Remote computer using WiFi from windows Mobile.

View 2 Replies

VS 2005 Identify A PC?

Sep 21, 2009

How can I uniquely identify a PC using vb.net code? Finding the PC name wil not work, as some users might use the same name. Please explain step by step, as vb.net is new to me.

View 25 Replies

VS 2005 How To Identify A Computer

Jul 27, 2010

on a network how can i identify a computer uniqulyof course not by system IP , why because IP can be changed easily or else other person on a network can change his system IP to another system IP while that IP in shut down status.hence i want to identify a system duly keeping any text file + some id written in it at any said address

View 1 Replies

2005 : Crystal Reports Application Or Windows Application To Generate Pdfs?

Apr 13, 2011

I currently have a simple crystal reports application which generates a crystal report and in the built in viewer provided by VS2005. There is a drop down where you can select options to change the criteria of the report. I wish to convert this app to a windows executable which will take all those select options and generates pdfs based on the crystal report. the executable will be triggered by windows task scheduler...or maybe command line app?

Obviously this will be somewhat of a re-write. What would be the best way to start this as? a crystal report application or a windows application.

View 2 Replies

How To Application Identify

Nov 8, 2009

How to my Application identify . About Windows Restart Timing And How much time Windows Restartand Thats alllogging it in Txt filei mean My application Logging Text oftime and date when Its Process Killed Like Closed

that is VB.6 code something Acording to my thread
Private Sub btnWaitForExit_Click( _
ByVal sender As System.Object, _

[code].....

View 12 Replies

VS 2005 Windows Server 2008 Compatibility?

Feb 23, 2010

I have a VB.NET executable program that I've been running nightly as a Windows Scheduled Task on a Windows Server 2003 machine. I have the source code, and it was compiled using VS 2005. Now I want to run it on a Windows Server 2008 R2 machine. If I try to "open" it from Windows Explorer, I get "The version of this file is not compatible with the version of Windows you are running." It is in Program Files(x86), so doesn't the OS know to run it as a 32-bit application? Do I have to load this in VS2008 and recompile it there as a 64-bit app? But all my old VB6 and VBScript scheduled tasks are running fine, why is the OS only complaining about this program?

View 1 Replies

Windows App Created In 2005 With Sql Server Backend?

Apr 24, 2012

I have a windows app created in 2005 with sql server backend. There's also a web service that is located on a web server at a hosting facility. In my app, when ever it needs to interact with the data, it calls the web service.Ive been having this issue with several screens that Ive developed in .Net. The user enters a date, and saves to the database. When the datagridview is refreshed, the date that they entered always displays one day earlier. Eg. If they entered 4/18/2012, it displays as: 4/17/2012.

The date is correct in the database. I verified that the problem resides on the web server. The default timezone set on the server is GMT -06.00 Central Time(US and Canada) and it cannot be changed on the shared server. The time zone where I'm at is Pacific Standard time. I'm not sure the best way to deal with this issue. Here's one way I was thinking: Retrieve today's date from the server (don't know how to do this), and compare it to the date on my machine so I know the difference. Then, when I'm looping through the datatable, add this same number to the dates to display correctly. Maybe it's better to retreive it from the database via the sql?

View 13 Replies

Application To Run On Windows Server?

Mar 20, 2011

I want to make run an application i developed in vb.net (developed with Visual studio 2008) to run on a windows server maybe (Win server 2003,2005,2008), my framework is .NET Framework 3.5.

i want my application to be accessed by different host computers but would be submitting into a single database that would have been installed on the server.

View 6 Replies

[2005] Parse RichText To Identify Start Of Sentence?

Feb 1, 2009

Is there a "best practices" way to parse a rich-text string (which contains the content of a several page document) so that I can identify the "start of a sentence"?The task at hand is this: basically, after making replacements in the text (substituting "markers" with actual data values), I then need to go back and see if any of the replacement data occurred at the start of a sentence, ensure that the first letter of that replacement is capitalized.

I can certainly find occurrences of sentences within paragraphs (i.e. a period followed by one or more spaces), but it is identifying the sentences at the start of paragraphs that would be the main challenge.In looking at the rich-text string in Notepad, I see that a paragraphs start with "par", but there are many variations, depending on other formatting, etc.

View 2 Replies

Access Remote Sql Server 2005 Work On Windows 7

Dec 21, 2011

how can i access remote sql server 2005 work on windows 7 ? and in the seem time i donot like turn off firewall .

and how i can make sql server listen to it port 1433

View 6 Replies

Mass Email Using Sql Server 2005 In Windows Form

Jun 29, 2009

I am doing a project on sending mass email. My codes should be able to read contacts/email from the SQL Server 2005 database and send mass email with attachments.Below are my codes for sending email. My windows application limitation is that it can only send email from a valid email address to a valid address one at a time with the help of a relay server. Also, it doesn't allow the user to attach attachments and could not read from the sql server database.[code]

View 1 Replies

Mass Email Using Sql Server 2005 In Windows Form?

Jun 29, 2009

I am doing a project on sending mass email. My codes should be able to read contacts/email from the SQL Server 2005 database and send mass email with attachments.

Below are my codes for sending email. My windows application limitation is that it can only send email from a valid email address to a valid address one at a time with the help of a relay server. Also, it doesn't allow the user to attach attachments and could not read from the sql server database.[code]...

View 7 Replies

VS 2005 Find Files In A Server In A Windows Service?

Mar 26, 2009

I use VB.net to create a Windows Service . its job is to connect a server ( for exemple \10.10.10.10ox named P: and collect files .but the problem is the result of mapping the server ( Dir P: = "" ) return nothing i don't find my files !!!Do i have to use the ftp in windows service ?? because when i use a windows form apllication there is no problems and I find all the files

View 3 Replies

[2005](Windows) Server.Mappath - Access A File

Feb 3, 2009

I am trying to access a file using the following

CODE:

However I am getting the following error: "Object reference not set to an instance of an object."

View 3 Replies

Client Server Windows Application

Oct 28, 2009

I have developed 2-3 standalone windows application using VS2008(vb.net) + Sql server (2008,2005) and quite comfortable with stand alone windows application. Now i am trying to make a windows app which will share a server database on LAN. I googled alot about this but still no success. So i decided to make that as stand alone app and i just changes the connection string to use remote server database. Everything is working fine still. All the insert, update and delete query are same as stand alone n me not getting any problem while testing through one more remote client system. But while googling i heard abt "CONCURRENCY" control.So please guide me is anything wll b wrong in future wid my this application when i will deploy this to my users? What about locks and how can i implement this to my Insert, update and delete queries to control concurrency and maintain integrity ?Please guide me step by step becoz i m new be to client/server application.

View 7 Replies

Windows Application And Web Server Connections?

Aug 17, 2010

I have a .net window application created and I wanted to see if it's at all possible to place various file dependencies off the web server. e.g. is it possible to have the connection to the database be off a web server?

I also would like to see if it's possible to place one of the .dlls off the web and have code that points to it to load.

View 2 Replies

Deploy 2005 With Crystal Report 9 On Windows Server R2 2008 X64

Dec 1, 2011

My problem is, when deploy vb.net 2005 with crystal report on Windows Server R2 2008, the report can't load it show blank. i'm using AxCRViewer91 component.

the DLL's;
AxInterop.CRVIEWER9Lib.dll
Interop.CRAXDRT.dll

Is it compatible on Windows Server R2 2008 x64?

View 1 Replies







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