ASP.NET Membership: CSS being blocked by Deny users, page doesn't render correctly?

后端 未结 6 1813
太阳男子
太阳男子 2021-01-12 07:04

I have a page that functions correctly but when i issue a deny user for the whole site it redirects me to the logon page which seems to work BUT the css is not working. Henc

6条回答
  •  失恋的感觉
    2021-01-12 07:39

    The 302 is from the login framework redirecting you to login when requesting the CSS.

    The trick here is your MVC app should not be configuring the security via web.config but rather you should be using the [Authorize] attributes on your controllers which will not interfere with your CSS.

提交回复
热议问题