Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Problem Please help.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem Please help.

 Post Reply Post Reply
Author
Leeb65 View Drop Down
Groupie
Groupie


Joined: 05 December 2003
Location: Germany
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote Leeb65 Quote  Post ReplyReply Direct Link To This Post Topic: Problem Please help.
    Posted: 30 June 2005 at 8:37am
I have a website in development, I changed a line of code in another form and got the following error in the login.
 

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   System.Web.UI.Control.OnBubbleEvent(Object source, EventArgs args)
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e)
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   System.Web.UI.Page.ProcessRequestMain()
 
The code I changed is not related to this page and I have taken the code out again, but I still get this error.
 
Does anyone have the slightest idea what it could be.
 
I have done a debug trace and everything executes correctly then when it leaves my code the error comes.
 
Thanks
 
Lee
Lee


Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 01 July 2005 at 6:00pm
It's a Null Reference Exception. Even though the code seems to be OK, you are querying something which does not exist aka is NULL. For example you have
Dim arr as array
For each s as string in arr
...
Next
Would cause a Null Reference Exception as arr does not have any members. If you put some clause to check for NULL around it, your code will surely run. (If I don't make sense, it's cause I am tired, hope you get the idea).
Back to Top
Leeb65 View Drop Down
Groupie
Groupie


Joined: 05 December 2003
Location: Germany
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote Leeb65 Quote  Post ReplyReply Direct Link To This Post Posted: 04 July 2005 at 2:52am
Michael,
 
Thanks for the reply, I honestly don't know what happened, but I restarted the computer and it all started to work again.
 
I had a problem the other week where the debugger said there was no source for the code I was running, reboot and it worked again.
 
thanks,
 
Lee


Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.