Object Reference not set error… First POST.

My first post needed to start with an error message. I thought this is one most common error message that you might face when running an aspx page or hosted WCF client. I have given the solution for this below.. 

Server Error in ‘/myservice’ Application.


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.Hosting.ISAPIWorkerRequestInProc.GetServerVariable(String name) +1579
   System.Web.Security.WindowsAuthenticationModule.OnEnter(Object source, EventArgs eventArgs) +103
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

try running aspnet_regiis -i

Advertisements

One Comment on “Object Reference not set error… First POST.”

  1. Ran says:

    Thanks
    It works pretty well


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s