Probably I don't understand nothing about authentication...

Discussion in 'ASP .Net Security' started by attilio, Feb 13, 2007.

  1. attilio

    attilio Guest

    Hy all,

    Here it is my web.config

    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <appSettings/>
    <connectionStrings>
    <add name="MySqlConnection" connectionString="Data
    Source=DESKTOP\SQL2005;Initial Catalog=MSSql16952;Persist Security
    Info=True;User ID=sa;Password=A1971_?05_G29"
    providerName="System.Data.SqlClient"/>
    </connectionStrings>
    <system.web>
    <membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">
    <providers>
    <clear />
    <add
    name="SqlProvider"
    type="System.Web.Security.SqlMembershipProvider"
    connectionStringName="MySqlConnection"
    enablePasswordRetrieval="false"
    enablePasswordReset="true"
    requiresQuestionAndAnswer="true"
    requiresUniqueEmail="true"
    passwordFormat="Hashed" />
    </providers>
    </membership>
    <roleManager
    enabled="true"
    cacheRolesInCookie="true"
    defaultProvider="AspNetSqlRoleProvider"
    cookieName=".ATTILIOGELOSA.IT"
    cookieSlidingExpiration="true"
    createPersistentCookie="false"
    cookieProtection="All">
    <providers>
    <clear />
    <add name="AspNetSqlRoleProvider"
    type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0,
    Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    connectionStringName="MySqlConnection"
    applicationName="AttilioGelosa"/>
    </providers>
    </roleManager>
    <authentication mode="Forms">
    <forms loginUrl="Login.aspx" cookieless="UseUri" />
    </authentication>
    <authorization>
    <allow users="*"/>
    </authorization>
    </system.web>
    </configuration>




    And this is in the directory I want to protect:




    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <system.web>
    <authorization>
    <allow roles="TimeTraking" />
    <deny users="?"/>
    </authorization>
    </system.web>
    </configuration>



    Now. The question is: why I have to insert my username and password *EVERY*
    time I try to go to one of the protected page? E.G. I try to go to
    Default.aspx in the protected directory and (...correctly...) system asks me
    to type username and password. After that if I click on one of the page
    "under" the Default.aspx the system ask me username and password another
    time...

    Thank you

    Attilio
    attilio, Feb 13, 2007
    #1
    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. simon

    Error message I don't understand

    simon, Dec 5, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    313
    Hatim R
    Dec 5, 2003
  2. m miller

    don't understand error

    m miller, Jan 9, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    1,726
    smitdso
    Sep 8, 2006
  3. Wayne  Wengert

    Don't Understand

    Wayne Wengert, May 1, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    366
    Wayne Wengert
    May 1, 2004
  4. Henri
    Replies:
    0
    Views:
    350
    Henri
    Oct 12, 2004
  5. Devin Jeanpierre
    Replies:
    2
    Views:
    451
    Devin Jeanpierre
    Feb 14, 2012
Loading...

Share This Page