I just ran the utility without any commands ant the wizard has come up. This is all independent of my web application.
I am guessing this is going to install the database tables to my existing database.UPDATE: They have been created
Will I then connect my web app to this database schema that is created?
How do I change the membership/roles users in my web app to point to the database tables?
To connect you app to the membership database you define the membership provider in web.config
main setting are connectionstring and application name.
Here a link with more info about the settings for you
http://weblogs.asp.net/scottgu/archive/2006/04/22/Always-set-the-_2200_applicationName_2200_-property-when-configuring-ASP.NET-2.0-Membership-and-other-Providers.aspx
To manage the membership role and user you can use ASP.NET Configuration tool you will
find it on the website menu in visual web developer.
Hope that helps you.
|||Weird, there is only 1 thing in my applications web config that references the roles and memberships..
<roleManager enabled="true" />
What should I be doing to connect the current roles and membership to the new SQL Server 2000 tables that the utility created?
In the ASP.NET Configuration tool, there is a provider tab, in this area there is a AspNetSqlProvider and a radio button, there is also a test link.
When I click the test link it eventually fails, even though I have created all the necessary tables in the 2000 database.
|||Ok you will need to setup a connection string to you database and define the membership provider.
Here is example for you
<connectionStrings><remove name="LocalSqlServer"/><!-- Connection for SQL 2000 --><add name="LocalSqlServer" connectionString="Driver={SQL Server};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;" providerName="System.Data.SqlClient"/></connectionStrings> <membership> <providers> <clear/> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true"requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="/" /> </providers></membership>
You then can setup the users and roles using the asp.net confrigation tool you will find it in the website menu in visual web developer express
I hope this helps
|||Ok, I will try to get farther. I am suprised none of this was added to the Web.config file as I have a working membership login ability... anyone know why?
Also, for the record, I am using Visual Studio 2005Standard Edition, will that change anything?
What is the situation with <remove name="...">
Are you just clearing the existing pair/key value? Is that needed?
|||I think the logic around why it is not added is to allow you to define the setting ie because you are using SQL 2000 or 2005.
No problem with a higher version just lots of people here are using express.
Yes you are right about the remove name, it just to make sure you are overriding the system defaults.
Hope it helps
No comments:
Post a Comment