setting up web.config...

Discussion in 'ASP .Net' started by RAB, Jun 11, 2006.

  1. RAB

    RAB Guest

    I am designing an application. I have 5 web pages. Page1.aspx,
    Page2.aspx, Page3.aspx, Page4.aspx and Login.aspx

    I want any user to freely be able to navigate between Page1.aspx and
    Page2.aspx

    However, I only want users who submit a valid username and password on
    Login.aspx to be able to navigate to Page3.aspx and Page4.aspx

    How do I set up my web.config file in order to have this functionality?

    Thanks,
    RABMissouri
    RAB, Jun 11, 2006
    #1
    1. Advertising

  2. You can :

    1. Assign your users to a role and limit access with <location path=...> in web.config.

    2. Place the protected files in a subdirectory,
    and control access with <location path=...> in web.config.

    http://www.howtodothings.com/computers/a792-aspnet-forms-authentication-with-roles.html

    3. You can also setup security per-page :

    <location path="some.aspx">
    <system.web>
    <authorization>
    <allow users="?" />
    </authorization>
    </system.web>
    </location>

    http://www.asp101.com/articles/matt/securesite/default.asp



    Juan T. Llibre, asp.net MVP
    aspnetfaq.com : http://www.aspnetfaq.com/
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en espaƱol : http://asp.net.do/foros/
    ===================================
    "RAB" <> wrote in message
    news:...
    >I am designing an application. I have 5 web pages. Page1.aspx,
    > Page2.aspx, Page3.aspx, Page4.aspx and Login.aspx
    >
    > I want any user to freely be able to navigate between Page1.aspx and
    > Page2.aspx
    >
    > However, I only want users who submit a valid username and password on
    > Login.aspx to be able to navigate to Page3.aspx and Page4.aspx
    >
    > How do I set up my web.config file in order to have this functionality?
    >
    > Thanks,
    > RABMissouri
    >
    Juan T. Llibre, Jun 12, 2006
    #2
    1. Advertising

  3. RAB

    Stephen Guest

    Put page3 and page4 in a subdirectory then put form authentication on that
    dir.

    "RAB" <> wrote in message
    news:...
    >I am designing an application. I have 5 web pages. Page1.aspx,
    > Page2.aspx, Page3.aspx, Page4.aspx and Login.aspx
    >
    > I want any user to freely be able to navigate between Page1.aspx and
    > Page2.aspx
    >
    > However, I only want users who submit a valid username and password on
    > Login.aspx to be able to navigate to Page3.aspx and Page4.aspx
    >
    > How do I set up my web.config file in order to have this functionality?
    >
    > Thanks,
    > RABMissouri
    >
    Stephen, Jun 12, 2006
    #3
    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. =?Utf-8?B?RGFuaWVs?=

    Machine.config & web.config

    =?Utf-8?B?RGFuaWVs?=, Jan 18, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    13,294
    Hermit Dave
    Jan 18, 2004
  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,254
    Kevin Spencer
    Feb 6, 2004
  3. Hardy Wang
    Replies:
    2
    Views:
    1,468
    Joe Fallon
    Jul 31, 2004
  4. Benny Ng
    Replies:
    9
    Views:
    9,939
    Benny Ng
    Oct 13, 2005
  5. CSharpner
    Replies:
    0
    Views:
    1,011
    CSharpner
    Apr 9, 2007
Loading...

Share This Page