Solved

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

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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
is this a cms? 8 69
Weighted Randomizing 6 32
Button function on table is in trouble 3 32
Filktering Alphabetically 8 41
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

713 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