Home All Groups Group Topic Archive Search About

Forms authentication with images on the login page

Author
25 Nov 2005 8:40 PM
Brian Muth
I'm pretty new to the ASP.NET world, and would appreciate some advise
regarding Forms authentication.

My login page has some GIF images which I'd like displayed. However, because
I haven't logged in yet, the GIF images are blanked out, unless I explicitly
allow access in the web.config file, as in:

<location path="buttons/SignInLogo.gif">
    <system.web>
       <authorization>
            <allow users="*" />
        </authorization>
    </system.web>
</location>



The problem, is I've got a dozen or so GIF's, and would like to add more.
Isn't there a better way than polluting my web.config file with all these
location tags?



Brian

Author
25 Nov 2005 9:27 PM
Edwin Knoppert
Put the web.config (copy) in the images dir, remove the path from both.
This is the easiest, like (in the images folder):

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <system.web>
        <authorization>
            <allow users="*" />
        </authorization>
    </system.web>
</configuration>


Show quoteHide quote
"Brian Muth" <bm***@mvps.org> schreef in bericht
news:u7AuKCg8FHA.736@TK2MSFTNGP09.phx.gbl...
> I'm pretty new to the ASP.NET world, and would appreciate some advise
> regarding Forms authentication.
>
> My login page has some GIF images which I'd like displayed. However,
> because I haven't logged in yet, the GIF images are blanked out, unless I
> explicitly allow access in the web.config file, as in:
>
> <location path="buttons/SignInLogo.gif">
>    <system.web>
>       <authorization>
>            <allow users="*" />
>        </authorization>
>    </system.web>
> </location>
>
>
>
> The problem, is I've got a dozen or so GIF's, and would like to add more.
> Isn't there a better way than polluting my web.config file with all these
> location tags?
>
>
>
> Brian
>
>
Are all your drivers up to date? click for free checkup

Author
25 Nov 2005 9:52 PM
Brian Muth
(Slap hand on forehead) Of course!

Thanks, Edwin.

Brian

Bookmark and Share