ASP.NET profile database

  • Thread starter Thread starter Ryan
  • Start date Start date
R

Ryan

Ok I'm made an ASP.NET site that uses roles, etc. I want to store all the
user information in a SQL Server database rather than the local .MDF file.
I've created and registered the database using aspnet_regsql.exe as per this
article:
http://msdn2.microsoft.com/en-us/library/014bec1k.aspx

The article even says I should probably use a SQL Server database rather
than the .MDF if I plan on having a lot of users, but it doesn't say how to
do it!! The website is still trying to store information in the .MDF and
the provider tab of the ASP.NET configuration page only has the one option:
AspNetSqlProfileProvider. How do I get the user information to go to the
correct database that I have set up?

Thanks,
Ryan
 
Ryan,

Make the following changes to your web.config

<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data
Source=sqlservername;Initial Catalog=databasename;User ID=YourUserName; Pwd =
YourPassword;" providerName="System.Data.SqlClient"/>


Ken
 
got it working, thanks.
Ryan

Ken Tucker said:
Ryan,

Make the following changes to your web.config

<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data
Source=sqlservername;Initial Catalog=databasename;User ID=YourUserName;
Pwd =
YourPassword;" providerName="System.Data.SqlClient"/>


Ken
 
Back
Top