View Single Post
  #19 (permalink)  
Old September 2nd, 2013, 11:28 PM
maurices5000 maurices5000 is offline
Authorized User
Points: 94, Level: 1
Points: 94, Level: 1 Points: 94, Level: 1 Points: 94, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2013
Posts: 24
Thanks: 7
Thanked 0 Times in 0 Posts

Thank guys for your help. At this point, I've read all of Chapter 19 and Appendix B. I understand a lot more than I did and it was a pleasure to read. Very easy to follow. I'm hoping the last part of Appendix B will fix my problem, but I don't understand it. This post is all about Appendix B the next post will tell you what I've done.

I'm in the last section of Appendix B and I don't understand it: "Configuring Application Services" Its the only thing so far I don't understand.

I'm not sure what the following statement means. Was this covered in Ch 19 and Appendix B?
Earlier in this book you learned that the ASP.NET application services make use of a SQL Server database. You also saw how to make sure your own website and the application services use the same database.
Follow these steps to let the application services use your own database:

1. First, make sure the application services point to a connection string you want to use. To do this, you need to set the connectionStringName to a connectionstring defined in your config file. The following example shows how to do this for the Membership section, but the other services follow a similar pattern: (I'm assuming this is in Web.Config. Its not in mine.)

< membership defaultProvider =" DefaultMembershipProvider" > < providers >
< add name =" DefaultMembershipProvider" type =" System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version =, Culture = neutral, PublicKeyToken = 31bf3856ad364e35" connectionStringName ="PlanetWroxConnectionString1" enablePasswordRetrieval =" false" enablePasswordReset =" true" requiresQuestionAndAnswer =" false" requiresUniqueEmail =" false" maxInvalidPasswordAttempts =" 5" minRequiredPasswordLength =" 7" minRequiredNonalphanumericCharacters =" 1" passwordAttemptWindow =" 10" applicationName ="/" /> </ providers >
</ membership >

Notice how connectionStringName points to the connection string called PlanetWroxConnectionString1, defined elsewhere in the config file.
(I didn't think this one was necessary. But i can do it if i need to. This is in SSMS.)

2. Make sure the account used by the web server has permissions to alter the database schema. You can accomplish this by adding the account to the db_ddladmin group, shown in Figure B. 6 . This grants the account the permissions to execute Data Definition Language statements , which means it can create and alter tables and other objects in the database.
I don't know what the following means:
4. Browse to your site and request the Login page. Try to log in with a fake username and password. At this stage, the .NET run time will modify the database and add the necessary tables to it. If you look in the database defined in the connection string used by the membership services, you'll notice it now contains the tables that are used by Membership, Roles, and Profile.