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.
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).
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???
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.
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.
Regards
Jeremy
If this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.
That way future readers will know which post solved your issue.
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!
Here is a comment simple outline to the web.config settings
<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.
Regards
Jeremy
If this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.
That way future readers will know which post solved your issue.
Member
1 Points
4 Posts
Login Problems
Aug 20, 2008 12:36 PM|mustang46|LINK
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.
Member
140 Points
29 Posts
Re: Login Problems
Aug 20, 2008 02:07 PM|igor.p|LINK
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).
my blog
[If this post answers your question, I would appreciate your marking it as "Answer"]
-- Deus est ergo cogito.
Member
1 Points
4 Posts
Re: Login Problems
Aug 20, 2008 02:15 PM|mustang46|LINK
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.Contributor
5190 Points
1469 Posts
Re: Login Problems
Aug 20, 2008 02:25 PM|jeremyh|LINK
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
Jeremy
If this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.
That way future readers will know which post solved your issue.
Member
1 Points
4 Posts
Re: Login Problems
Aug 20, 2008 07:55 PM|mustang46|LINK
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!
Contributor
5190 Points
1469 Posts
Re: Login Problems
Aug 21, 2008 07:26 AM|jeremyh|LINK
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
Jeremy
If this has helped Please: Don't forget to click "Mark as Answer" on the post that helped you.
That way future readers will know which post solved your issue.
Member
1 Points
4 Posts
Re: Login Problems
Aug 25, 2008 04:30 PM|mustang46|LINK
Thanks for all the help. I got it working. Turns out my SQL server was having some issues.