Solved

Displaying image on login page

Posted on 2006-10-25
2
1,187 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error on Add method 1 51
Interview questions for support of a legacy ASP.NET site 4 58
ASP.net Fit image buttons according to size of the screen 2 20
Deploying to Azure 3 29
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
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…

777 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