简体   繁体   中英

Will enabling a page-level trace in ASP.Net page recycle my application pool?

If I add "trace=true" into my directive on an asp.net 2.0 .aspx page, will it recycle my application pool?

I know if I enable tracing in web.config that will recycle the application pool.

The webserver is IIS 6.0.

Thanks.

I believe it will just trigger a recompile of that page. Editing of an aspx file is not a trigger for an application restart.

Why not test it out and see?

I'm not 100% sure but it shouldn't. Any change to a web.config file would cause an app pool reset, but a page level change shouldn't even in the directive.

Check out the section "Why does an application domain recycle?" in this link

Technically if it's the 15th re-compile it could cause a reset... but other than that no.

好的-我只是在测试服务器上进行了尝试-在页面级添加“ trace = true”指令并没有回收应用程序池。

It won't. the app pool only recycles when a dll is changed in the Bin directory or if the web.config file is changed. If you are concerned about loosing your session info as that is what the question seems to me to be more related to then you can use the asp.net session state provider and that way your app pool can recycle as many times as it likes without you loosing your session.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM