ASP.NET profile database

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
 
G

Guest

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
 
R

Ryan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top