ASP.NET Authentication with Themes

I am having trouble with ASP.NET Authentication in combonation with ASP.NET 2.0 Themes. It seems when I use

            <authorization>
                  <deny users="?" />
                  <allow users="*" />
            </authorization>

in my web.config file, all StyleSheets are disabled for all users unless they are logged in. This is obviously not the behavior I want.
LVL 2
derekthorntonAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
asp_lhaConnect With a Mentor Commented:
you can make a new subdir , put all of the StyleSheets to the new subdir

Or just add some code to web.config like the following :

  <location path="SiteStyle.css" >
    <system.web>
      <authorization>
        <allow users="*"  />
      </authorization>
    </system.web>
  </location>
0
 
derekthorntonAuthor Commented:
I'm not sure I understand. I have more than just one stylesheet, how do I address that issue?
Also, they all are in a subdirectory in the Themes folder.

App_Themes->Default->Stylesheets is the folder.
0
 
derekthorntonAuthor Commented:
Also, I cannot hardcode a path with ASP.NET 2.0 Themes. It is dynamic, generated based on the theme selected.
0
 
derekthorntonAuthor Commented:
Solved it. I simply used App_Themes as the path! :o

Thanks for the help! That fixed the problem nicely.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.