webconfig

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jenny

    webconfig

    Hi all

    I'm using forms authentication for my page. My webconfig
    (parts):

    <authenticati on mode="Forms" >
    <forms
    name="AuthCooki e"
    path="\"
    loginUrl="Login .aspx"
    protection="All "
    timeout="200">
    <credentials passwordFormat= "Clear">
    <user name="Test" password="Passw ord" />
    </credentials>
    </forms>
    </authentication>

    <authorizatio n>

    <deny users="?" />

    </authorization>
    </system.web>
    <location path="start.asp x">
    <system.web>
    <authorizatio n>
    <allow users="*" />
    </authorization>
    </system.web>
    </location>
    <location path="Login.asp x">
    <system.web>
    <authorizatio n>
    <allow users="*" />
    </authorization>
    </system.web>
    </location>
    </configuration>

    If I use instead:
    <authorizatio n>
    <allow users="*" />
    </authorization>

    everthing works fine.
    If I do login correct I can't find a authentificatio n
    cookie in IE (in Netscape an authentificatio n cookie can be
    found).
    After login the same page is shown with the following url:


    My forms-code is:

    If (FormsAuthentic ation.Authentic ate(TextBox_Nam e.Text,
    TextBox_Passwor d.Text)) Then
    FormsAuthentica tion.SetAuthCoo kie(TextBox_Nam e.Text,False)
    Response.Redire ct("Selection.a spx", True)
    ....

    Is there someting wrong?

    Thanks a lot for help!

    Jenny
  • AW

    #2
    Re: webconfig

    Hi Jenny,

    Try to these two changes together:

    1. replace
    <authorizatio n>
    <deny users="?" />
    </authorization>

    with
    <authorizatio n>
    <deny users="?" />
    <allow users="*" />
    </authorization>

    2. replace
    FormsAuthentica tion.SetAuthCoo kie(TextBox_Nam e.Text,False)
    Response.Redire ct("Selection.a spx", True)

    with
    FormsAuthentica tion.RedirectFr omLoginPage(Tex tBox_Name.Text, True)
    --
    To reply, remove a "l" before the @ sign.

    Arnaud Weil - MCT, MCSD.Net, MCAD.Net


    Comment

    Working...