ASP.NET CSS file not loaded when adding HttpModule to web.config

空扰寡人 提交于 2019-12-02 10:39:11

at last i found the solution, the problem source is working with the session in the HttpModule events cause strange problems.

It looks like it is a known issue and whether or not session state is available is actually decided... by the SessionStateModule itself! Briefly, in order to force session state to load current Context.Handler, usually DefaultHttpHandler, has to be replaced in the PostMapRequestHandler event by some other handler, implementing IRequiresSessionState. To be safe, my dummy handler carries a reference to the original handler, and I swap it back in the PostAcquireRequestState event, once the dummy handler fulfilled its purpose.

actually it is a known issue in Asp.net and IIS and the solution is reported Here at ASP.NET forum. also there is a sample code to solve the problem in link. I tested and my problem solved!

Thanks All,

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