Solved

How can I get my web.config file to ignore my css and images folder

Posted on 2011-03-06
5
663 Views
Last Modified: 2012-05-11
Ive got forms authentication kinda working in an ASP app but it wants to protect everything and there is a css folder and an images folder, both of which, because of the authentication are being protected to the point that when I run the site in Visual Studio all I see is white background with the logon page the formating and the images do not show up.

Im attaching that part of my web.config file in the code section(slightly edited for security reasons)

Ive scowered the MSDN sites and googled all over the place and this authentication is driving me nutts.

<authentication mode="Forms">
     <forms name=".ADAuthCookie" loginUrl="Login.aspx"  protection="All" defaultUrl="newpage.aspx" domain="testsite.com" timeout="90" path="/" />
    </authentication>
 
    
   <authorization>
      <deny users="?" />
      <allow users="*" />
    </authorization>

Open in new window

0
Comment
Question by:ThePrettyGeek
  • 3
5 Comments
 
LVL 8

Accepted Solution

by:
PagodNaUtak earned 500 total points
ID: 35053387
Here, put this in web.config
<location path="css">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>

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

Open in new window

0
 
LVL 8

Expert Comment

by:PagodNaUtak
ID: 35053391
Here is the detail explanation...
0
 
LVL 1

Expert Comment

by:lalitgada
ID: 35053460
<system.web>

   <authorization>

       <deny users="?"/>

   </authorization>

</system.web>

<location path="/images">

    <system.web>

        <authorization>

            <allow users="*"/>

        </authorization>

    </system.web>

</location>
0
 
LVL 8

Expert Comment

by:PagodNaUtak
ID: 35053492
@lalitgada,

Hi! I already suggested that, please see my post.

Before posting please check if what you are posting is already suggested!
0
 

Author Closing Comment

by:ThePrettyGeek
ID: 35057195
There was another post that said here is the explanation and I would love to still have that link as it did not show up or I didn't see it, so please teacher send it again.

Cristy
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

896 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

19 Experts available now in Live!

Get 1:1 Help Now