Connecting Tech Pros Worldwide Forums | Help | Site Map

Forms authentication with images on the login page

Brian Muth
Guest
 
Posts: n/a
#1: Nov 25 '05
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



Edwin Knoppert
Guest
 
Posts: n/a
#2: Nov 25 '05

re: Forms authentication with images on the login page


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>


"Brian Muth" <bmuth@mvps.org> schreef in bericht
news:u7AuKCg8FHA.736@TK2MSFTNGP09.phx.gbl...[color=blue]
> 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
>
>[/color]


Brian Muth
Guest
 
Posts: n/a
#3: Nov 25 '05

re: Forms authentication with images on the login page


(Slap hand on forehead) Of course!

Thanks, Edwin.

Brian


Closed Thread