Master Page display goes with Authorization
I am using the authorization
section in w开发者_如何学编程eb.config:
<authorization>
<allow roles="Administrator,Attorney,Director of Operations,Office Manager,Paralegal,Partner,Processor,Salary Admin,Unit Manager"/>
<deny users="*"/>
</authorization>
With this code in place, my master page CSS, as well as my images go away, and when I remove this from the web.config it displays properly. Any idea why it is showing that way? Your help will be appreciated.
This authorization
section also applies to your CSS files and images. You need to use the location
element to give anonymous access back to these files. Here's a knowledge base article about this. Your web.config should look something like this:
<configuration>
<system.web>
<!-- This is your section from your question -->
<authorization>
<allow roles="Administrator,Attorney,Director of Operations,Office Manager,Paralegal,Partner,Processor,Salary Admin,Unit Manager"/>
<deny users="*"/>
</authorization>
</system.web>
<!-- Now give everyone access to your "images" folders -->
<location path="Images">
<system.web>
<authorization>
<allow users ="*" />
</authorization>
</system.web>
</location>
</configuration>
精彩评论