newbie: security & themes!

Discussion in 'ASP .Net' started by Jeff, Sep 19, 2006.

  1. Jeff

    Jeff Guest

    Hey

    asp.net 2.0

    I have a webpage which get it's layout data from a theme. Using the theme
    works without problem until I added these settings to the web.config file:
    <authorization>
    <deny users="?"/>
    </authorization>

    With this new settings in web.config the theme isn't applied to the page!

    I've only tested this for unauthenticated users

    Top-most script in Default.aspx file:
    <%@ Page Language="C#" MasterPageFile="~/MainMaster.master"
    AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"
    Title="Untitled Page" Theme="Standard" %>

    What should I do make the theme work with the newly applied web.config
    settings?

    Jeff
     
    Jeff, Sep 19, 2006
    #1
    1. Advertising

  2. Hi,
    This is a strange problem, does your theme use Css or reference other images,
    if so you need to allow access to these Css and image files for everyone,
    for example i have two folder Css and Images where i store my css and other
    images used in the site graphics i have to add these lines to the web.config
    to allow access to these folders
    <location path="images">
    <system.web>
    <authorization>
    <allow users="*"/>
    </authorization>
    </system.web>
    </location>
    <location path="Css">
    <system.web>
    <authorization>
    <allow users="*"/>
    </authorization>
    </system.web>
    </location>

    May be this will resolve your problem.

    Regards,
    Mohamed Mosalem

    "Jeff" wrote:

    > Hey
    >
    > asp.net 2.0
    >
    > I have a webpage which get it's layout data from a theme. Using the theme
    > works without problem until I added these settings to the web.config file:
    > <authorization>
    > <deny users="?"/>
    > </authorization>
    >
    > With this new settings in web.config the theme isn't applied to the page!
    >
    > I've only tested this for unauthenticated users
    >
    > Top-most script in Default.aspx file:
    > <%@ Page Language="C#" MasterPageFile="~/MainMaster.master"
    > AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"
    > Title="Untitled Page" Theme="Standard" %>
    >
    > What should I do make the theme work with the newly applied web.config
    > settings?
    >
    > Jeff
    >
    >
    >
    >
     
    =?Utf-8?B?TW9oYW1lZCBNb3NhbGVt?=, Sep 19, 2006
    #2
    1. Advertising

  3. Jeff

    Jeff Guest

    Hello Mohamed, thank you for replying to this post!

    Yes, this theme is using css, but the .css file is in the theme folder:
    App_Themes\Standard\Default.css

    This css file is referencing a image file which is placed in the same folder
    as the Default.css file

    Should I use this script then:
    </location>
    <location path="App_Themes\Standard\">
    <system.web>

    Any suggestions? maybe I instead should use a .skin file?

    Jeff


    "Mohamed Mosalem" <> wrote in
    message news:...
    > Hi,
    > This is a strange problem, does your theme use Css or reference other
    > images,
    > if so you need to allow access to these Css and image files for everyone,
    > for example i have two folder Css and Images where i store my css and
    > other
    > images used in the site graphics i have to add these lines to the
    > web.config
    > to allow access to these folders
    > <location path="images">
    > <system.web>
    > <authorization>
    > <allow users="*"/>
    > </authorization>
    > </system.web>
    > </location>
    > <location path="Css">
    > <system.web>
    > <authorization>
    > <allow users="*"/>
    > </authorization>
    > </system.web>
    > </location>
    >
    > May be this will resolve your problem.
    >
    > Regards,
    > Mohamed Mosalem
    >
    > "Jeff" wrote:
    >
    >> Hey
    >>
    >> asp.net 2.0
    >>
    >> I have a webpage which get it's layout data from a theme. Using the theme
    >> works without problem until I added these settings to the web.config
    >> file:
    >> <authorization>
    >> <deny users="?"/>
    >> </authorization>
    >>
    >> With this new settings in web.config the theme isn't applied to the page!
    >>
    >> I've only tested this for unauthenticated users
    >>
    >> Top-most script in Default.aspx file:
    >> <%@ Page Language="C#" MasterPageFile="~/MainMaster.master"
    >> AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"
    >> Title="Untitled Page" Theme="Standard" %>
    >>
    >> What should I do make the theme work with the newly applied web.config
    >> settings?
    >>
    >> Jeff
    >>
    >>
    >>
    >>
     
    Jeff, Sep 19, 2006
    #3
  4. Hi Jeff,
    Of course you need the skin file, this file determines the styles and
    properties that will be applied to the server controls
    "Jeff" wrote:

    > Hello Mohamed, thank you for replying to this post!
    >
    > Yes, this theme is using css, but the .css file is in the theme folder:
    > App_Themes\Standard\Default.css
    >
    > This css file is referencing a image file which is placed in the same folder
    > as the Default.css file
    >
    > Should I use this script then:
    > </location>
    > <location path="App_Themes\Standard\">
    > <system.web>
    >
    > Any suggestions? maybe I instead should use a .skin file?
    >
    > Jeff
    >
    >
    > "Mohamed Mosalem" <> wrote in
    > message news:...
    > > Hi,
    > > This is a strange problem, does your theme use Css or reference other
    > > images,
    > > if so you need to allow access to these Css and image files for everyone,
    > > for example i have two folder Css and Images where i store my css and
    > > other
    > > images used in the site graphics i have to add these lines to the
    > > web.config
    > > to allow access to these folders
    > > <location path="images">
    > > <system.web>
    > > <authorization>
    > > <allow users="*"/>
    > > </authorization>
    > > </system.web>
    > > </location>
    > > <location path="Css">
    > > <system.web>
    > > <authorization>
    > > <allow users="*"/>
    > > </authorization>
    > > </system.web>
    > > </location>
    > >
    > > May be this will resolve your problem.
    > >
    > > Regards,
    > > Mohamed Mosalem
    > >
    > > "Jeff" wrote:
    > >
    > >> Hey
    > >>
    > >> asp.net 2.0
    > >>
    > >> I have a webpage which get it's layout data from a theme. Using the theme
    > >> works without problem until I added these settings to the web.config
    > >> file:
    > >> <authorization>
    > >> <deny users="?"/>
    > >> </authorization>
    > >>
    > >> With this new settings in web.config the theme isn't applied to the page!
    > >>
    > >> I've only tested this for unauthenticated users
    > >>
    > >> Top-most script in Default.aspx file:
    > >> <%@ Page Language="C#" MasterPageFile="~/MainMaster.master"
    > >> AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"
    > >> Title="Untitled Page" Theme="Standard" %>
    > >>
    > >> What should I do make the theme work with the newly applied web.config
    > >> settings?
    > >>
    > >> Jeff
    > >>
    > >>
    > >>
    > >>

    >
    >
    >
     
    =?Utf-8?B?TW9oYW1lZCBNb3NhbGVt?=, Sep 19, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Weatherford

    Re: Applying Frontpage 2003 themes to ASP.NEt Pages

    Robert Weatherford, Jun 12, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    380
    Robert Weatherford
    Jun 12, 2004
  2. Martin

    ASP.Net 2.0 themes vs css

    Martin, Jun 23, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,632
    Martin
    Jun 23, 2004
  3. Jack
    Replies:
    2
    Views:
    399
  4. Brian Henry

    ASP.NET 2.0 Master pages and themes

    Brian Henry, Jul 10, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    4,209
    Brian Henry
    Jul 11, 2004
  5. RichardF

    Problem with Themes in asp.net 2.0

    RichardF, Nov 6, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,665
    Jeffrey Palermo [MCP]
    Nov 7, 2004
Loading...

Share This Page