Solved

Displaying image on login page

Posted on 2006-10-25
2
1,188 Views
Last Modified: 2008-02-26
I am porting a site from asp.net to asp.net 2 and the site have forms authentication (To much work to change to the new authentication model)

<authentication mode="Forms">
      <forms loginUrl="Login.aspx" name="FORMSAUTHCOOKIE"/>  
    </authentication>
    <authorization>
      <deny users="?"/>
    </authorization>

The problem is that the css file and the images of the login page is denied. How do I allow a directory (image directory) and a certain file (in my case the css file) to bypass the security?
0
Comment
Question by:dogbrain
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 125 total points
ID: 17802202
You need to specify a <location>.  Here is a Micro$oft KB article that might help explain what I mean:

HOW TO: Control Authorization Permissions in an ASP.NET Application
http://support.microsoft.com/kb/316871

Bob
0
 
LVL 7

Assisted Solution

by:RBertora
RBertora earned 25 total points
ID: 17802331
What a weird error, forms auth stopping css working...

any way.
This should do the trick

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

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


</configuration>

Rob;-)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

740 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