View Single Post
  #1 (permalink)  
Old October 22nd, 2009, 03:43 AM
CFRham CFRham is offline
Registered User
 
Join Date: Oct 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Difficulties with "web.config" and "ASPNETDB"

Hi,

Thank you for this great book that's advancing my knowledge in MVC. I have got two quesions, a specific one and general one.

1. Specific question.

On the very top of the page 116, it is said:

Quote:
...you will also need to create a user for your application to use in order to access the newly created database. To do this, expand the Security folder, right-click the Logins folder, and select New Login...
Here is what I did. When the "New login" dialog box appeared, I wrote "TheBeerHouse" in the login name textbox. Then I went to the UserMapping page and gave the user the db_datareader and db_datawriter rights. When I run it, I get the following exception:

Quote:
An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name. (Microsoft SQL Server, Error: 1038)
How and when theBeerHouse was created????! Could you be more specific either by giving the steps or by pointing me to some ressources that can help me.

2. General question

I remember that to create ASPNETDB in webforms, I just need to run a page that has on it a control, suah as CreateUserWizard. Also, if I decide to use the built in security module of MVC, I just need to create a new user to get the ASPNETDB appear under the App_Data folder.

In TheBeerHouse sample:
-We add the appropriate entries in the "web.config"
-We create TheBeerHouse DataBase

So, when do we get our DB be populated with tables??? When we run the application???? How TheBeerHouseUser was created????

I've been struggling with these concepts for days now. Any help will really jumpstart my MVC learning.

Thank you for helping me.