Groups | Blog | Home
all groups > asp.net > january 2006 >

asp.net : Possible to exempt /Images from form authentication via web.config?


Keith Patrick
1/1/2006 11:36:48 PM
I have an app with some graphics on the login page, but they won't show up
because the user is not authenticated, so ASP (2.0) is blocking access to
the files. I can expose the /Images path in IIS, but it seems there has to
be a way that I'm having trouble finding to allow /Images to be exempted
from forms authenticatation such that anyone, authenticated or not, can view
the application's images. Any tips on a config section or way to do this?

Brock Allen
1/2/2006 1:31:11 PM
use a <location> element in web.config:

<configuration>
<location path="images">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
</configuration>

-Brock
DevelopMentor
http://staff.develop.com/ballen

[quoted text, click to view]

AddThis Social Bookmark Button