Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-04-12
3
Medium Priority
?
472 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 200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
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/…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

885 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