M
Mantorok
Hi
During certain periods I want all requests to my site to be redirected, the
only place I can see to do this is in the Session_Start event handler in the
global.asax file but when I try the following:
Session.Abandon();
Response.Redirect(http://www.site.com)
I get an error:
System.Web.HttpException: Session state has created a session id, but cannot
save it because the response was already flushed by the application.
at System.Web.SessionState.SessionIDManager.SaveSessionID(HttpContext
context, String id, Boolean& redirected, Boolean& cookieAdded)
at System.Web.SessionState.SessionStateModule.CreateSessionId()
at System.Web.SessionState.SessionStateModule.DelayedGetSessionId()
at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source,
EventArgs eventArgs)
at System.Web.SessionState.SessionStateModule.OnEndRequest(Object source,
EventArgs eventArgs)
at
System.Web.HttpApplication.SyncEventExecutionStep.SystemWeb.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
Obviously I'm not approaching this the right way - any ideas?
Thanks
Kev
During certain periods I want all requests to my site to be redirected, the
only place I can see to do this is in the Session_Start event handler in the
global.asax file but when I try the following:
Session.Abandon();
Response.Redirect(http://www.site.com)
I get an error:
System.Web.HttpException: Session state has created a session id, but cannot
save it because the response was already flushed by the application.
at System.Web.SessionState.SessionIDManager.SaveSessionID(HttpContext
context, String id, Boolean& redirected, Boolean& cookieAdded)
at System.Web.SessionState.SessionStateModule.CreateSessionId()
at System.Web.SessionState.SessionStateModule.DelayedGetSessionId()
at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source,
EventArgs eventArgs)
at System.Web.SessionState.SessionStateModule.OnEndRequest(Object source,
EventArgs eventArgs)
at
System.Web.HttpApplication.SyncEventExecutionStep.SystemWeb.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously)
Obviously I'm not approaching this the right way - any ideas?
Thanks
Kev