开发者

Conflict between Global.asx and CSS

开发者 https://www.devze.com 2023-01-11 18:51 出处:网络
I need to restrict multiple users from logging into my system. I am using Application_OnPostAuthenticateRequest event in global.asax to see if anybody is logged in. It works really well.

I need to restrict multiple users from logging into my system. I am using Application_OnPostAuthenticateRequest event in global.asax to see if anybody is logged in. It works really well.

But CSS is not loading and the screen looks horrible. If I comment out the code 开发者_C百科in that event, the page renders perfectly...

What am I missing? What does Application_OnPostAuthenticateRequest has anything to do with CSS??

Thanks a lot for the help


Move your css to a folder that contains the following web.config

<system.web>
  <authorization>
    <allow users="*"/>
  </authorization>
</system.web>

Then change your header text to point to the new css location. If you ar using themes simply add the web.config file to you theme folder.

Note: This overrides your security settings and allows everyone access to the folder containing the additional web.config file. This also includes sub folders

0

精彩评论

暂无评论...
验证码 换一张
取 消