Forms authentication with images on the login page

B

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
 
E

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top