ConfigurationErrorsException “Thread was being aborted” on Membership.Provider

谁都会走 提交于 2019-12-07 19:30:25

问题


Occasionally on app restart this error will occur:

System.Configuration.ConfigurationErrorsException - System.Web, Thread was being aborted.     
(C:\Inetpub\web.config line 417) 
at System.Web.Security.Membership.Initialize() 
at System.Web.Security.Membership.get_Provider()
...

When it does the app needs to be restarted to clear the error, every page request after this raises the same bug. Line 417 is the Membrship provider add line in web.config. We're using the UpmMembershipProvider from MS Commerce Server, but it doesn't seem to be hitting this code, it's dying on the ConfigurationErrorsException inside System.Web.Security.Membership.Initialize() before it tried to instantiate the UpmMembershipProvider. If it was an error inside UpmMembershipProvider I'd expect to see it inside the stacktrace.

What can cause System.Configuration.ConfigurationErrorsException - System.Web, Thread was being aborted. to be raised?


回答1:


Is the configuration by any chance redirecting the response?
Server.Transfer and Response.Redirect can cause a ThreadAbortedException.



来源:https://stackoverflow.com/questions/2218789/configurationerrorsexception-thread-was-being-aborted-on-membership-provider

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!