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


I am authorizing simple forms for a small asp.net (3.5, C #) application and my users Web.config setting name and password

I would like to apply the default stylesheet and include the header graphics (included on every other page) but the graphic and stylesheet will not apply, presumably because anonymous users do not have access to those two files. Is there a handy way to show the image on the page or an easy way to add?

The web here. The config section of the configuration is:

  & lt; Authentication mode = "form" & gt; & Lt; Form Name = ". ASPXFORMSAUTH" path = "/" loginUrl = "login.aspx" security = "all" timeout = "30" & gt; & Lt; Credentials Password Format = "SHA1" & gt; & Lt; Username = "testseer" password = "hashosizer" /> & Lt; / Credibility & gt; & Lt; / Forms & gt; & Lt; / Authentication & gt; & Lt; Authority & gt; & Lt; Deny users = "?" / & Gt; & Lt; / Authorization & gt;  

The stylesheet is here: / stylesheet. Here's the CSS and image: /img/logoimage.png

Thanks. This site makes me happy because it is expected that it will make the exchange exchange and their lame salaries!

You can add exceptions to your web. Configure to use location-specific rules (add these after the System web section):

  & lt; Location path = "stylesheet.css" & gt; & Lt; System.web & gt; & Lt; Authority & gt; & Lt; Allow users = "*" /> & Lt; / Authorization & gt; & Lt; /system.web> & Lt; / Location & gt; & Lt; Location path = "img /" & gt; & Lt; System.web & gt; & Lt; Authority & gt; & Lt; Allow users = "*" /> & Lt; / Authorization & gt; & Lt; /system.web> & Lt; / Location & gt;  

Comments