特别奇怪的是,我没有记录任何应用程序事件日志,ELMAH也没有选择任何东西.我已经禁用了自定义错误,为文件放置FormsAuthentication位置异常,确保我没有引用任何其他文件(图像等),但没有修复它.
我已经阅读了SO和Google Googled上的每个帖子几个小时,不能弄清楚.任何想法可能是错的?我在这里拉我的头发
解决方法@H_404_8@
更新:
你有这个在你的web.config?
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<httpRuntime waitChangeNotification="300" maxWaitChangeNotification="300"/>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
</configuration>
But there’s one more catch.
ASP.NET will unload the application as
soon as the web.config is changed,but
it won’t actually reload it and apply
the “waitChange…” settings until a
request is made. So you could still
drop the app_offline.htm and
web.config in,and if the first requst
occurs while a dll is only half
copied,the exception will occur. To
add insult to injury,the exception
will persist until you replace the
temporary web.config or the total
duration of your “waitChange…” time
expires!
To get around this final hurdle,you’d
need to make a request to the
application after uploading the
temporary web.config,but before you
start deploying the application files.
The complete process is as follows:
- Add app_offline.htm
- Replace application’s web.config with a temporary web.config (as above)
- Request any ASP.NET resource on the site so the new
waitChangeNotification gets “applied”*
- Make any file system changes necessary (deploy bin dlls,other site
files)
- Replace temporary web.config with the original application
web.config
- Delete app_offline.htm
*You may dispute what happens in step 2-3,since ASP.NET shuts down the
application after step 1. Indeed,it
does not appear from my event viewer
that the web.config change is
registered or “applied” as a result of
either step 2 or 3,but nevertheless
the updated waitChangeNotification
settings do get applied after step 3.
你有这个在你的web.config?
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <httpRuntime waitChangeNotification="300" maxWaitChangeNotification="300"/> </system.web> <system.webServer> <modules runAllManagedModulesForAllRequests="true" /> </system.webServer> </configuration>
But there’s one more catch.
ASP.NET will unload the application as
soon as the web.config is changed,but
it won’t actually reload it and apply
the “waitChange…” settings until a
request is made. So you could still
drop the app_offline.htm and
web.config in,and if the first requst
occurs while a dll is only half
copied,the exception will occur. To
add insult to injury,the exception
will persist until you replace the
temporary web.config or the total
duration of your “waitChange…” time
expires!To get around this final hurdle,you’d
need to make a request to the
application after uploading the
temporary web.config,but before you
start deploying the application files.
The complete process is as follows:
- Add app_offline.htm
- Replace application’s web.config with a temporary web.config (as above)
- Request any ASP.NET resource on the site so the new
waitChangeNotification gets “applied”*- Make any file system changes necessary (deploy bin dlls,other site
files)- Replace temporary web.config with the original application
web.config- Delete app_offline.htm
*You may dispute what happens in step 2-3,since ASP.NET shuts down the
application after step 1. Indeed,it
does not appear from my event viewer
that the web.config change is
registered or “applied” as a result of
either step 2 or 3,but nevertheless
the updated waitChangeNotification
settings do get applied after step 3.