| Dart Home | PowerTCP FTP for .NET | Custom Development | Reply | PowerTCP FTP for .NET Topics | Forums |
| Author | Forum: PowerTCP FTP for .NET Topic: System.NullReferenceException on Object Creation in VS.NET Debugging |
| joshhandel From: Austin, TX USA Posts: 2 Member Since: 05/25/04 |
posted May 25, 2004 1:21 PM I am working on a window service that was running just fine under the debugger. This morning I opened my debugger and started testing the service and I get this exception. System.NullReferenceException "Object reference not set to an instance of an object." this error happens at this line every time this.ftp1 = new Ftp(this.components); Thanks for any help you can provide. Josh |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted May 25, 2004 4:22 PM Are you sure it's that exact line that is causing the error? If so, it looks to me like this.Components has been deleted. I'm not sure why that would be though. Are you sure the service isn't being closed somewhere else? |
| kevinamlive From: torrance, CA USA Posts: 2 Member Since: 05/25/04 |
posted May 25, 2004 4:41 PM I am getting the same problem when creating the smtp class in C#. The error doesn't always occur though, maybe one out of every five times. The code looks like this: DartMail.SmtpClass smtp = new DartMail.SmtpClass(); |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted May 25, 2004 4:48 PM kevinamlive: Please reduce this down to the simplest possible program you can write that causes the error to occur, then zip up the program and send it to support@dart.com |
| joshhandel From: Austin, TX USA Posts: 2 Member Since: 05/25/04 |
posted May 25, 2004 6:28 PM I found the issue in the debugger. I am stopping on all exceptions (handled or not) you guys have a handled NullReference exception that happens on many or all of the creations of your object. anyways I just need to icnor that exception and all is well.. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted May 25, 2004 10:46 PM That makes sense. There are many errors that we trap and handle. If you change the debugger settings to break on all errors then it what was being described should occur. |
| Reply | PowerTCP FTP for .NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|