November Happy Hour will be moved to Thursday December 5th.

System.AccessViolationException during Response.Redirect

Vote:
 

I have a page with an ImageButton and on my button's command method, I have this:

Response.Redirect(CurrentPage.ProductPerspectivePage);

The value of CurrentPage.ProductPerspectivePage is "/Templates/Spinifex/Pages/ProductPerspective.aspx?id=112"

However, it gives me a violation exception.

[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
   EPiServer.Web.UrlRewriteModule.HttpUrlRewriteToExternal(String url, Boolean removeId, RebaseKind typeOfUrl) +740
   EPiServer.Web.UrlRewriteModuleBase.EndRequestEventHandler(Object sender, EventArgs e) +137
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +79
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +170

ProductPerspective.aspx has barely nothing on it.

Hoping someone could shed some light. Thanks.

#51577
Jun 16, 2011 4:41
Vote:
 

For some reason, it's working now. Earlier when I restarted IIS and tested the site, it still failed.

So I modified the code to Response.Redirect("http://www.google.com") and as expected it went to google's site.

 

I changed it back to the original code, and it's working now. weird.

#51578
Jun 16, 2011 5:29
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.