Solved

ASP.NET Authentication with Themes

Posted on 2007-03-24
4
661 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

734 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