jekain314
01-22-2008, 03:52 AM
I failed on my first attempt to follow these directions.
Let me ask a few questions before I begin again.
///////////////////////////////////////////////////////////</BLOCKQUOTE>
How to configure the ASP.NET 2.0 Membership/Roles Provider to use SQL 2000 or SQL 2005?
The information in this article applies to:
ASP.NET 2.0
MS SQL 2000
MS SQL 2005
[b]SUMMARY
This article describes how toconfigure the ASP.NET 2.0 Membership/Rolesprovider to use SQL 2000 or SQL 2005.
(1) I assume this also works for the 90 day free trialVS 2008 beta which I believe uses MS SQL 2005?DETAILS
The following steps create the full Application Servicesdatabase schema on our SQL Server database.
I'm not sure what the above statement means. On my local app (that works), I have a database.mdf and a ASPNETDB.MDF databases/tables.
Note that I have already set the security for my site at this point to test it. This gave me the ASPNETDB.MDF database.
(2) Do the following steps merge these databases into a single schema?
(3) After I complete the command, will I see anything different locally?
(4) At what point do I copy my local website to the DASP FTP drop?
Open the command prompt on your local computer, and navigate to: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
Execute the command: aspnet_regsql.exe -S DBServerName -U DBLogin -P DBPassword -A all -d DBName
(5) Can I use the more GUI-friendly aspnet_regsql.exe to achieve the same thing as the command line?
The various DBServerName, DBLogin, DBPassword, DBName are as assigned by DASP when I purchased/registered mySQL databasewith DASP.
Obviously this suggests that the registration onto DASPhas already occurred.
Currently, there is no management interface to manage the membership database besides using Visual Web Developer or creating your own application using the membership provider class.
I assume this means that I must use the Web Site Administration Tool that is provided with VS 2008 to add members and roles.
(6) After I execute the aspnet_regsql command, is the admin tool now directing the DASP copy of the site?
(7) Is there any way to revert so that the Admin Tool applies to the local website?
Below is an example of how to configure Visual Web Developer to manage the membership database.
Create a web application in Visual Web Developer or Visual Studio 2005.
Open the web.config.
The default membership provider uses a connection string called "LocalSqlServer". Therefore, replace: <connectionStrings/>
with <connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="Data Source=DBServerName;Integrated Security=false;Initial Catalog=DBName;User ID=DBLogin;Password=DBPassword" providerName="System.Data.SqlClient" />
</connectionStrings>I believe the above connection implies that there is now only one database -- the ASPNETDB.MDF and database.mdf were merged into a single schema. (8) Have I erred by already setting the security up in my local web site so that database.mdf and ASPNET.MDF are separated?
Save and close the web.config.
Go to Website menu, and run the ASP.NET Configuration tool. This will open the Web Site Administration tool.
In the Web Site Administration tool, go to the Security tab.
Click on "Select authentication type".
Select "From the internet". Click the Done button.
Create your admin roles and users.
Then create access rules.
Create a rule that applies to the "Anonymous users" with "Deny" permissions.
Create another rule that applies to the admin role you created with "Allow" permissions.
Your application is now ready to use the membership provider, and you can begin creating your login forms.
In my case, I already went through 1-10 above with my local web site to test it.
(9) Was this a mistake?
(10) If so, is there any way to correct this?
Thanks for your patience ...
---Jim
Let me ask a few questions before I begin again.
///////////////////////////////////////////////////////////</BLOCKQUOTE>
How to configure the ASP.NET 2.0 Membership/Roles Provider to use SQL 2000 or SQL 2005?
The information in this article applies to:
ASP.NET 2.0
MS SQL 2000
MS SQL 2005
[b]SUMMARY
This article describes how toconfigure the ASP.NET 2.0 Membership/Rolesprovider to use SQL 2000 or SQL 2005.
(1) I assume this also works for the 90 day free trialVS 2008 beta which I believe uses MS SQL 2005?DETAILS
The following steps create the full Application Servicesdatabase schema on our SQL Server database.
I'm not sure what the above statement means. On my local app (that works), I have a database.mdf and a ASPNETDB.MDF databases/tables.
Note that I have already set the security for my site at this point to test it. This gave me the ASPNETDB.MDF database.
(2) Do the following steps merge these databases into a single schema?
(3) After I complete the command, will I see anything different locally?
(4) At what point do I copy my local website to the DASP FTP drop?
Open the command prompt on your local computer, and navigate to: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
Execute the command: aspnet_regsql.exe -S DBServerName -U DBLogin -P DBPassword -A all -d DBName
(5) Can I use the more GUI-friendly aspnet_regsql.exe to achieve the same thing as the command line?
The various DBServerName, DBLogin, DBPassword, DBName are as assigned by DASP when I purchased/registered mySQL databasewith DASP.
Obviously this suggests that the registration onto DASPhas already occurred.
Currently, there is no management interface to manage the membership database besides using Visual Web Developer or creating your own application using the membership provider class.
I assume this means that I must use the Web Site Administration Tool that is provided with VS 2008 to add members and roles.
(6) After I execute the aspnet_regsql command, is the admin tool now directing the DASP copy of the site?
(7) Is there any way to revert so that the Admin Tool applies to the local website?
Below is an example of how to configure Visual Web Developer to manage the membership database.
Create a web application in Visual Web Developer or Visual Studio 2005.
Open the web.config.
The default membership provider uses a connection string called "LocalSqlServer". Therefore, replace: <connectionStrings/>
with <connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="Data Source=DBServerName;Integrated Security=false;Initial Catalog=DBName;User ID=DBLogin;Password=DBPassword" providerName="System.Data.SqlClient" />
</connectionStrings>I believe the above connection implies that there is now only one database -- the ASPNETDB.MDF and database.mdf were merged into a single schema. (8) Have I erred by already setting the security up in my local web site so that database.mdf and ASPNET.MDF are separated?
Save and close the web.config.
Go to Website menu, and run the ASP.NET Configuration tool. This will open the Web Site Administration tool.
In the Web Site Administration tool, go to the Security tab.
Click on "Select authentication type".
Select "From the internet". Click the Done button.
Create your admin roles and users.
Then create access rules.
Create a rule that applies to the "Anonymous users" with "Deny" permissions.
Create another rule that applies to the admin role you created with "Allow" permissions.
Your application is now ready to use the membership provider, and you can begin creating your login forms.
In my case, I already went through 1-10 above with my local web site to test it.
(9) Was this a mistake?
(10) If so, is there any way to correct this?
Thanks for your patience ...
---Jim