Web config security settings

Discussion in 'ASP .Net Security' started by Kazim Kargi, Aug 21, 2003.

  1. Kazim Kargi

    Kazim Kargi Guest

    Hi all;
    I want to use user name and password in my asp.net project
    for all aspx files but not for asmx files. Or i want to
    use some files with user name but some another not
    In web config my configuration is;
    authentication mode="Forms">
    <forms loginUrl="tom/ortak/LoginPage.aspx"
    protection="All" path="/tom/"/>
    </authentication>

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

    I want some files not to ask user name/ pass while other
    project files ask on same time. How can i do?

    Thanks for your help...
    Kazim Kargi, Aug 21, 2003
    #1
    1. Advertising

  2. Kazim Kargi

    Teemu Keiski Guest

    In the same web.config (that means also files in the same application)
    specify a <location> tag (inside <configuration> outside <system.web>) that
    points to the file. Inside it specify differentiating authorization details.

    ....
    </system.web>
    <location path="publicpage.aspx">
    <system.web>
    <authorization>
    <allow users="*" />
    </authorization>
    </system.web>
    </location>
    ....
    </configuration>

    If you need to protect other content than normal ASP.NET stuff like aspx,
    asmx etc, you need to map that file extension in IIS for ASP.NET's ISAPI dll
    so those files are served by ASp.NET (that they are *not* by default)

    --
    Teemu Keiski
    MCP, Designer/Developer
    Mansoft tietotekniikka Oy
    http://www.mansoft.fi

    AspInsiders Member, www.aspinsiders.com
    ASP.NET Forums Moderator, www.asp.net
    AspAlliance Columnist, www.aspalliance.com


    "Kazim Kargi" <> wrote in message
    news:0cf301c367f2$61063850$...
    > Hi all;
    > I want to use user name and password in my asp.net project
    > for all aspx files but not for asmx files. Or i want to
    > use some files with user name but some another not
    > In web config my configuration is;
    > authentication mode="Forms">
    > <forms loginUrl="tom/ortak/LoginPage.aspx"
    > protection="All" path="/tom/"/>
    > </authentication>
    >
    > <authorization>
    > <deny users="?"/>
    > </authorization>
    >
    > I want some files not to ask user name/ pass while other
    > project files ask on same time. How can i do?
    >
    > Thanks for your help...
    >
    >
    Teemu Keiski, Aug 21, 2003
    #2
    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. CT
    Replies:
    0
    Views:
    520
  2. =?Utf-8?B?QXVndXN0aW4gUHJhc2FubmEuIEo=?=

    Web.Config Get Config settings at runtime.

    =?Utf-8?B?QXVndXN0aW4gUHJhc2FubmEuIEo=?=, Feb 5, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,242
    Kevin Spencer
    Feb 6, 2004
  3. CSharpner
    Replies:
    0
    Views:
    999
    CSharpner
    Apr 9, 2007
  4. leeanne
    Replies:
    0
    Views:
    1,840
    leeanne
    Sep 24, 2008
  5. donet programmer
    Replies:
    3
    Views:
    1,517
    Gregory A. Beamer
    Nov 20, 2009
Loading...

Share This Page