locked
Login Problems RRS feed

  • Question

  • User809645632 posted

    Hey Guys,

    I am new to ASP and I was playing around with the starter site.  I can log into the site just fine in 2008 VWD pro just fine.  When I publish the site to my web server I now longer able to log into the site.  Any ideas would be appreciated.
     

    Wednesday, August 20, 2008 12:36 PM

Answers

  • User-1705717250 posted

    So are you using IIS and SQL Server 2005?

    Take a read of http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395
    this will show you how to setup iis and sql together.

    Here is a comment simple outline to the web.config settings

    <?xml version="1.0" encoding="UTF-8"?>
     

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
     <connectionStrings>
        <remove name="LocalSqlServer" />
    	<!--You add your connectionstring here-->
    	<!--Use something like this for a database in App_data folder-->
    	<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;
    Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
    	 <!--Use something like this for a Local sql server
    	 <add name="LocalSqlServer" connectionString="server=machinename\SQLEXPRESS; initial catalog=databasename;uid=username;Pwd=password"
     providerName="System.Data.SqlClient"/> -->
    <!--For more info on connectionStrings take a look at http://www.connectionstrings.com -->
    </connectionStrings>
       <system.web>
    <!--set if you are using roles-->
         <roleManager>
    			<providers>
    				<add name="AspNetSqlRoleProvider"
    				connectionStringName="LocalSqlServer"
    				applicationName="/" 
    				type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    			</providers>
    		</roleManager>
         <authentication mode="Forms">
            <forms timeout="50000000"/>
    		<!--More info at http://weblogs.asp.net/scottgu/archive/2005/11/08/430011.aspx  -->
          </authentication>
    <!--set if you are using membership-->
    <!-- You should ALWAYS customize the Membership provider and specify an applicationName... 
    see http://weblogs.asp.net/scottgu/archive/2006/04/22/Always-set-the-_2200_applicationName_2200_
    -property-when-configuring-ASP.NET-2.0-Membership-and-other-Providers.aspx for more details... --> <membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="15"> <providers> <clear/> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0,
    Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" /> </providers> </membership> </system.web> </configuration>
     Hope it helps, let me know how you get on.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 21, 2008 7:26 AM

All replies

  • User202934567 posted

    What happens?  Does it just tell you that it cannot authenticate you or do you get a more glaring SQL exception?

    I assume you're using the local SQL Express database, so I would make sure that you copy it to your web server (not that you would want to do that once your application is in production).

    Wednesday, August 20, 2008 2:07 PM
  • User809645632 posted

     

    What happens?  Does it just tell you that it cannot authenticate you or do you get a more glaring SQL exception?

    I assume you're using the local SQL Express database, so I would make sure that you copy it to your web server (not that you would want to do that once your application is in production).


    It does not authenticate.  I checked out some of the other posts regarding the same issue, but no luck yet. I'm thinking it may have something to do with my web.config file???

    Yes I am using the SQL Express database.

     

    Wednesday, August 20, 2008 2:15 PM
  • User-1705717250 posted

    Are you using a web hosting company for this? If so do they support sql express database in the App_data folder many do not
    so you have to use the sql server and move the database into it.

    Steps to do that are here http://weblogs.asp.net/scottgu/archive/2006/12/22/recipe-deploying-a-sql-database-to-a-remote-hosting-environment-part-1.aspx

    After that you will need to update the connectionString to point to the new database, you should be able to find the correct setting
    in your hosting control panel or hosts support site.

    Also you need to make sure that you applicationName is defined in the membership provider, this show you how
    http://weblogs.asp.net/scottgu/archive/2006/04/22/Always-set-the-_2200_applicationName_2200_-property-when-configuring-ASP.NET-2.0-Membership-and-other-Providers.aspx

    Hope it helps

    Wednesday, August 20, 2008 2:25 PM
  • User809645632 posted

    Jeremyh,

    I am hosting this site on my own webserver here at the office.  How should my connection string look if it's hosted on my own server (I am a newbie)?  Any examples on what it should like look would be great!

    Thanks! 

     

     

     

    Wednesday, August 20, 2008 7:55 PM
  • User-1705717250 posted

    So are you using IIS and SQL Server 2005?

    Take a read of http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395
    this will show you how to setup iis and sql together.

    Here is a comment simple outline to the web.config settings

    <?xml version="1.0" encoding="UTF-8"?>
     

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
     <connectionStrings>
        <remove name="LocalSqlServer" />
    	<!--You add your connectionstring here-->
    	<!--Use something like this for a database in App_data folder-->
    	<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;
    Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
    	 <!--Use something like this for a Local sql server
    	 <add name="LocalSqlServer" connectionString="server=machinename\SQLEXPRESS; initial catalog=databasename;uid=username;Pwd=password"
     providerName="System.Data.SqlClient"/> -->
    <!--For more info on connectionStrings take a look at http://www.connectionstrings.com -->
    </connectionStrings>
       <system.web>
    <!--set if you are using roles-->
         <roleManager>
    			<providers>
    				<add name="AspNetSqlRoleProvider"
    				connectionStringName="LocalSqlServer"
    				applicationName="/" 
    				type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    			</providers>
    		</roleManager>
         <authentication mode="Forms">
            <forms timeout="50000000"/>
    		<!--More info at http://weblogs.asp.net/scottgu/archive/2005/11/08/430011.aspx  -->
          </authentication>
    <!--set if you are using membership-->
    <!-- You should ALWAYS customize the Membership provider and specify an applicationName... 
    see http://weblogs.asp.net/scottgu/archive/2006/04/22/Always-set-the-_2200_applicationName_2200_
    -property-when-configuring-ASP.NET-2.0-Membership-and-other-Providers.aspx for more details... --> <membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="15"> <providers> <clear/> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0,
    Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" /> </providers> </membership> </system.web> </configuration>
     Hope it helps, let me know how you get on.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, August 21, 2008 7:26 AM
  • User809645632 posted

    Thanks for all the help.  I got it working.  Turns out my SQL server was having some issues. 

    Monday, August 25, 2008 4:30 PM