Solved

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

Posted on 2004-04-12
3
434 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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/…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

759 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

21 Experts available now in Live!

Get 1:1 Help Now