i am using
Default membership provider for my asp.net application, and i use
DefaultSessionStateProvider included in it. Now, i can see there are unhadnled exceptions in this provider such as for SQLExcpetion when database server is down.
In this case, i want to redirect to a custom error page. I am doing this in Appliccation_error in event in Global.asax. However, it just goes in an indefinite cycle and keeps on throwing exception again and again. Seems like defaultsessionstateprovider is
alwayhs trying to connect to sql server, even though my error page is just an hlml page.
Exception that i sbeing caught in HttpContext.Current.Server.GetLastError() everytine is as follow:
at System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
at System.Web.Providers.Entities.ModelHelper.GetStorageMetadata(String providerName, DbConnection connection, String ssdl)
at System.Web.Providers.Entities.ModelHelper.CreateMetadataWorkspace(String providerName, DbConnection connection, String csdl, String ssdl, String msl)
at System.Web.Providers.Entities.ModelHelper.CreateEntityConnection(ConnectionStringSettings setting, String csdl, String ssdl, String msl)
at System.Web.Providers.Entities.ModelHelper.CreateSessionEntities(ConnectionStringSettings setting)
at System.Web.Providers.DefaultSessionStateProvider.PurgeExpiredSessions()
at System.Web.Providers.DefaultSessionStateProvider.PurgeIfNeeded()
at System.Web.Providers.DefaultSessionStateProvider.InitializeRequest(HttpContext context)
at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
doodsingh
0 Points
1 Post
Error while redirecting in case of unhandled errors in global error with DefaultSessionStateProvi...
Oct 18, 2011 04:28 AM|LINK
Hi,
i am using Default membership provider for my asp.net application, and i use DefaultSessionStateProvider included in it. Now, i can see there are unhadnled exceptions in this provider such as for SQLExcpetion when database server is down.
In this case, i want to redirect to a custom error page. I am doing this in Appliccation_error in event in Global.asax. However, it just goes in an indefinite cycle and keeps on throwing exception again and again. Seems like defaultsessionstateprovider is alwayhs trying to connect to sql server, even though my error page is just an hlml page.
Exception that i sbeing caught in HttpContext.Current.Server.GetLastError() everytine is as follow:
at System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
at System.Web.Providers.Entities.ModelHelper.GetStorageMetadata(String providerName, DbConnection connection, String ssdl)
at System.Web.Providers.Entities.ModelHelper.CreateMetadataWorkspace(String providerName, DbConnection connection, String csdl, String ssdl, String msl)
at System.Web.Providers.Entities.ModelHelper.CreateEntityConnection(ConnectionStringSettings setting, String csdl, String ssdl, String msl)
at System.Web.Providers.Entities.ModelHelper.CreateSessionEntities(ConnectionStringSettings setting)
at System.Web.Providers.DefaultSessionStateProvider.PurgeExpiredSessions()
at System.Web.Providers.DefaultSessionStateProvider.PurgeIfNeeded()
at System.Web.Providers.DefaultSessionStateProvider.InitializeRequest(HttpContext context)
at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)