Home All Groups Group Topic Archive Search About

ASP.NET profile database

Author
21 Jun 2006 2:49 PM
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

Author
21 Jun 2006 6:42 PM
Ken Tucker [MVP]
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
--------------------------

Show quoteHide quote
"Ryan" wrote:

> 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
>
>
>
Author
21 Jun 2006 7:09 PM
Ryan
got it working, thanks.
Ryan

Show quoteHide quote
"Ken Tucker [MVP]" <KenTucker***@discussions.microsoft.com> wrote in message
news:A9394AD0-60BC-4F4F-BF85-808CF4401463@microsoft.com...
> 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
> --------------------------
>
> "Ryan" wrote:
>
>> 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
>>
>>
>>