473,394 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

ASP.NET profile database

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
Jun 21 '06 #1
2 1033
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

Jun 21 '06 #2
got it working, thanks.
Ryan

"Ken Tucker [MVP]" <Ke**********@discussions.microsoft.com> wrote in message
news:A9**********************************@microsof t.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

Jun 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Shimon Sim | last post by:
Hi I am working on application that need to hold custom user information - Last and first name, email, some other domain related information. I used to create Base class for all my pages. The base...
4
by: Marco Assandri | last post by:
Hi everybody, I have a problem with this code. 'An anonymous username copied from the Username column of Aspnet_Users table with IsAnonymous = True dim SurelyAnonymousUsername =...
13
by: Ashley Bryant | last post by:
I'm just starting my first 2.0 site with the new membership features and am having some trouble with profiles. I have my providers set up and working fine and profile data is being written to the...
1
by: Giovanni | last post by:
Dear Friends, I am having problems with the following: I have added a Login control to a web page. In the Login control's Authenticate event, I am performing additional validation against our...
2
by: shapper | last post by:
Hello, I added some profile properties to my web.config file. Then I started to use my profile properties in a page class and I get an error: An error has occurred while establishing a...
2
by: Peter Afonin | last post by:
Hello, I'm using CreateUserWizard control in ASP.NET 2.0. I'm storing the data in SQL Server 2005. The first and last steps run smoothly without any problems. But I added one middle step to...
9
by: Eric Falsken | last post by:
I've added a number of additional properties to my profile. Sometimes, the values are populated when the user is retrieved from the database, but sometimes the values are empty/default. How can I...
4
by: R.A.M. | last post by:
Hello, I am writing ASP.NET application in which I need to use User Profiles and Session mechanisms. Here I include part of my source code (Admin.cs): using System; using System.Data; using...
4
by: Scott M. | last post by:
When profile data is stored in ASP .NET, where is the user data persisted? For how long is it persisted: is it session persisted or permanent (like a cookie)?
5
by: Steven | last post by:
I have the following in my web.config: <system.web> <profile defaultProvider="MyASPSqlProfileProvider" enabled="true" > <properties> <add name="FirstName" defaultValue="" type="string"/> <add...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.