Solved

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

Posted on 2011-03-06
5
665 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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
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…

828 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