Solved

ASP.NET Authentication with Themes

Posted on 2007-03-24
4
619 Views
Last Modified: 2008-01-09
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.
0
Comment
Question by:derekthornton
  • 3
4 Comments
 
LVL 5

Accepted Solution

by:
asp_lha earned 500 total points
ID: 18787543
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
 
LVL 2

Author Comment

by:derekthornton
ID: 18787548
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
 
LVL 2

Author Comment

by:derekthornton
ID: 18787559
Also, I cannot hardcode a path with ASP.NET 2.0 Themes. It is dynamic, generated based on the theme selected.
0
 
LVL 2

Author Comment

by:derekthornton
ID: 18787569
Solved it. I simply used App_Themes as the path! :o

Thanks for the help! That fixed the problem nicely.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
call function 8 40
Compare site how does it work 4 52
DLL in ASP.NET 20 45
ASP.NET reading ATOM 2 27
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

746 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

11 Experts available now in Live!

Get 1:1 Help Now