Abdul Basith

Abdul Basith

  • NA
  • 22
  • 8.1k

Object reference not set to an instance of an object

Mar 21 2016 5:03 AM


My project running without any error in localhost.But after hosting the same on the client server i got the error "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.

and the Strack Trace codes are given:

I'm a beginner, I know that this is a repeated question. But i just want to know what may be the reason for getting this error only on hosted copy but not in local copy. and one more thing, How can i find out the origin of the error from the Strack trace codes. I know that this error is due to the null reference.But i have checked all scenarios which can cause a null reference error, and no such type of error in my local copy.


Answers (2)