Results 1 to 6 of 6

Thread: Login problems

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Location
    Indiana
    Posts
    451

    Question Login problems

    I am integrating a shopping cart into my site, commerce starter kit, and I have gotten both to read from the same SQL Server with the same application name and I can login on the cart site with the same username and password that I use for my site. My problem is that if I log in to my site, then go to the cart, the cart doesn't recognize me as being logged in. I keep the cart in a sub folder and they both use seperate web.config files. Is there a way to carry it from one place to the other (I don't mean they are on seperate servers by that, they are on the same server). I am new to all of this so I am not even sure where to look to get this to work.

    Thank you for your help.

  2. #2
    Fanatic Member
    Join Date
    May 2001
    Posts
    837

    Re: Login problems

    To kick off the replies my best guess would be to look at authentication cookies. See if there's some way to have the same cookie used for both sites.
    The human brain cannot hold all of the knowledge that exists in this world, but it can hold pointers to that knowledge.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Location
    Indiana
    Posts
    451

    Re: Login problems

    I think this is the cookie part, so I am trying it in both web.config files so that the cookies will have the same name. When I try it though I get an error for the path part. I have looked in the help file, and online a bit, but haven't found a difinitive answer for what the path is for.

    VB Code:
    1. <authentication mode="Forms"/>
    2.     <forms name=".PEPWEB1" loginUrl="login.aspx" protection="All" timeout="30" path="/"/>
    3.     <authorization>
    4.       <allow users="?"/>
    5.     </authorization>

    Thank you for your help.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Location
    Indiana
    Posts
    451

    Re: Login problems

    I misunderstood the error. The problem was that I closed the authentication tag before setting the forms. I fixed it, but it still doesn't carry over the information.

    VB Code:
    1. Here is the section for my main directory web.config file
    2. <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    3.     <appSettings/>
    4.     <connectionStrings>
    5.     <add name="PEPSqlServer" connectionString="Removed" />
    6.  </connectionStrings>
    7.     <system.web>
    8.     <roleManager enabled="true">
    9.       <providers>
    10.         <clear/>
    11.         <add name="AspNetSqlRoleProvider"
    12.                          connectionStringName="LocalSqlServer"
    13.                          applicationName="PEPWEB1"
    14.                          type="System.Web.Security.SqlRoleProvider"/>
    15.       </providers>
    16.     </roleManager>
    17.     <membership defaultProvider="AspNetSqlMembershipProvider"
    18.                                              userIsOnlineTimeWindow="15"
    19.                                              hashAlgorithmType="">
    20.       <providers>
    21.         <clear/>
    22.         <add connectionStringName="PEPSqlServer"
    23.                                                 enablePasswordRetrieval="false"
    24.                                                 enablePasswordReset="true"
    25.                                                 requiresQuestionAndAnswer="true"
    26.                                                 applicationName="PEPWEB1"
    27.                                                 requiresUniqueEmail="True"
    28.                                                 passwordFormat="Hashed"
    29.                                                 maxInvalidPasswordAttempts="5"
    30.                                                 passwordAttemptWindow="10"
    31.                                                 passwordStrengthRegularExpression=""
    32.                                                 minRequiredPasswordLength="6"
    33.                                                 minRequiredNonalphanumericCharacters="0"
    34.                                                 name="AspNetSqlMembershipProvider"
    35.                                                 type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    36.       </providers>
    37.     </membership>
    38.  
    39. This is from the cart web.config file
    40. <roleManager enabled="true">
    41.       <providers>
    42.         <clear/>
    43.         <add name="AspNetSqlRoleProvider"
    44.                 connectionStringName="LocalSqlServer"
    45.                 applicationName="PEPWEB1"
    46.                 type="System.Web.Security.SqlRoleProvider"/>
    47.       </providers>
    48.     </roleManager>
    49.     <membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="15" hashAlgorithmType="">
    50.       <providers>
    51.         <clear/>
    52.         <add connectionStringName="LocalSqlServer"
    53.                enablePasswordRetrieval="false"
    54.                enablePasswordReset="true"
    55.                requiresQuestionAndAnswer="true"
    56.                applicationName="PEPWEB1"
    57.                requiresUniqueEmail="True"
    58.                passwordFormat="Hashed"
    59.                maxInvalidPasswordAttempts="5"
    60.                passwordAttemptWindow="10"
    61.                passwordStrengthRegularExpression=""
    62.                minRequiredPasswordLength="6"
    63.                minRequiredNonalphanumericCharacters="0"
    64.                name="AspNetSqlMembershipProvider"
    65.                type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    66.       </providers>
    67.     </membership>
    68.     <anonymousIdentification enabled="true"/>
    69.     <authentication mode="Forms">
    70.       <forms name=".PEPWEB1" loginUrl="login.aspx" protection="All" timeout="30" path="/"/>
    71.     </authentication>
    72.     <authorization>
    73.       <allow users="?"/>
    74.     </authorization>

    Thank you for your help.
    Last edited by Krenshau; Sep 5th, 2006 at 05:59 PM.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Location
    Indiana
    Posts
    451

    Re: Login problems

    I didn't add this, and it won't let me edit that post now. This is in the main root web.config file

    VB Code:
    1. <authentication mode="Forms">
    2.       <forms name=".PEPWEB1"
    3.              loginUrl="login.aspx"
    4.              requireSSL="false"
    5.              protection="All"
    6.              timeout="30"
    7.              path="/"/>
    8.     </authentication>
    9.     <authorization>
    10.       <allow users="?"/>
    11.     </authorization>

  6. #6
    Fanatic Member
    Join Date
    May 2001
    Posts
    837

    Re: Login problems

    Can someone else help this guy? I don't really know much about this.
    The human brain cannot hold all of the knowledge that exists in this world, but it can hold pointers to that knowledge.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width