Using ASP.NET Forms Authentication, how do I get an image to appear on the login screen?

后端 未结 1 1340
滥情空心
滥情空心 2021-02-03 12:47

I am doing simple forms authentication for a small ASP.NET (3.5, C#) application and setting up my usernames and passwords in the web.config.

I would like to apply the d

相关标签:
1条回答
  • 2021-02-03 13:13

    You can add exceptions in your Web.Config using location-specific rules (add these after the System.Web section):

    <location path="stylesheet.css">
        <system.web>
            <authorization>
                <allow users="*" />
            </authorization>
        </system.web>
    </location>
    
    <location path="img/">
        <system.web>
            <authorization>
                <allow users="*" />
            </authorization>
        </system.web>
    </location>
    
    0 讨论(0)
提交回复
热议问题