Link to home
Start Free TrialLog in
Avatar of Ashley Bryant
Ashley BryantFlag for United States of America

asked on

ASP.NET - Display Images on Forms-Based Authentication Site

I'm building a new site using ASP.NET / VB.NET and am taking advantage of the form-based authentication that is built in.  Well, the login works fine, but I am unable to include stylesheets or images on the login page.  They apparently are blocked because the user is not authenticated.  Is there a way to "unblock" css and image files and still use forms-based authentication, or am I going to have to go with plain text for my login page?
ASKER CERTIFIED SOLUTION
Avatar of glsac
glsac
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ashley Bryant

ASKER

Here's my web.config.  I did it the same way that they suggested in Wrox's "Beginning ASP.NET 1.1 with VB.NET 2003":

<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
    <appSettings>
        <add key="connString" value="Provider=sqloledb;Data Source=DSNAME;Initial Catalog=DATABASE;User Id=USER;Password=PASS;" />
    </appSettings>
    <system.web>
        <authentication mode="Forms">
            <forms name=".pesvaliduser" loginUrl="login.aspx" protection="All" timeout="20" />
        </authentication>
        <authorization>
            <deny users="?" />
        </authorization>
    </system.web>
</configuration>
Hey qlsac, those location tags took care of my problem.  thanks much.  I knew it had to be something simple that I was just overlooking.