Saturday, March 24, 2012

Strange Error with IE but not with firefox

Hi

When I try to signout of a page, I get this error only with Internet Explorer. The code works fine with firefox. Can someone tell me why? Thanks

Server Error in '/' 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.

It would be better if we see the code and try to know what is causing that error.

regards


Thanks! There you go:

Sub SignOut(objSender As Object, objArgs As EventArgs)
FormsAuthentication.SignOut()
Response.Redirect(Request.UrlReferrer.ToString())
End Sub

The error message is:

Server Error in '/' 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:

Line 8: 'redirect the user to their referring pageLine 9: 'Response.Redirect("Thanks2.aspx")Line 10: Response.Redirect(Request.UrlReferrer.ToString())Line 11: End SubLine 12:

Source File: C:\Default.aspx Line:10
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.] ASP.default_aspx.SignOut(Object objSender, EventArgs objArgs) in C:\Default.aspx:10 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain() +1292

Thanking you in advance

0 comments:

Post a Comment