Unfortunately it's almost impossible to diagnose your problem without some more details. That must be the most popular ASP.NET error message out there :)
Are you getting this error on your local machine or a remote server?
Can you enable debug mode to get the full stack trace?
Are you using custom appSettings or connectionStrings, have they been carried over to the live environment?
The error basically means that you are using an object before you've created an instance of it. For example:
MyObject foo;
foo.Add(someInformation) // Error here because the object has been created but not instantiated
for the above code to work, you'll need to instantiate:
MyObject foo = new MyObject();
foo.Add(someInformation) // No error now because you've created an instance of the object
Basically, your object is null because either you've not created an instance of it or the instance is based on an incorrect configuration making it null, such as assigning something from a misconfigured connectionStrings or appSettings (as Greg suggests). If you could give us some more information, we can try and work out the more likely causes.
Object reference not set to an instance of an object.
It works in Dev and soon as I publish Only one page dont' work
using Visual studio 2008 and .net Framework 3.5 and IIS 7 4.0.
Only error in browser is
Hi Jay,
Unfortunately it's almost impossible to diagnose your problem without some more details. That must be the most popular ASP.NET error message out there :)
Are you getting this error on your local machine or a remote server?
Can you enable debug mode to get the full stack trace?
Are you using custom appSettings or connectionStrings, have they been carried over to the live environment?
Do you have a URL you can show us?
Greg.
The error basically means that you are using an object before you've created an instance of it. For example:
MyObject foo;
foo.Add(someInformation) // Error here because the object has been created but not instantiated
for the above code to work, you'll need to instantiate:
MyObject foo = new MyObject();
foo.Add(someInformation) // No error now because you've created an instance of the object
Basically, your object is null because either you've not created an instance of it or the instance is based on an incorrect configuration making it null, such as assigning something from a misconfigured connectionStrings or appSettings (as Greg suggests). If you could give us some more information, we can try and work out the more likely causes.
Edit: Maybe it's folder permissions? See http://our.umbraco.org/forum/core/general/35627-Object-reference-not-set-to-an-instance-of-an-object
is working on a reply...