Solved

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

Posted on 2004-04-12
3
439 Views
Last Modified: 2007-12-19
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?
0
Comment
Question by:AshleyBryant
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
glsac earned 50 total points
ID: 10810606
Odd...would like to see you web.config file and what you did...but maybe try this:

</configuration>

<location path="LOGIN_PAGE_NAME.aspx">
      <system.web>
    <authorization>
        <allow users="*" />
    </authorization>
    </system.web>
</location>

</configuration>

Try to add these <location> tags in between your configuration tabs (just change loginpagename.aspx).
0
 
LVL 12

Author Comment

by:AshleyBryant
ID: 10814056
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>
0
 
LVL 12

Author Comment

by:AshleyBryant
ID: 10814280
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.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now