p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional ASP.NET MVC 3 (http://p2p.wrox.com/forumdisplay.php?f=649)
-   -   ASP.Net Tutorial and This Book (http://p2p.wrox.com/showthread.php?t=85258)

JackHerr October 6th, 2011 11:53 AM

ASP.Net Tutorial and This Book
If you follow the asp.net tutorial, you get a different route to what I hope will be the same end as strictly following the book. (I will return to the book after finishing tutorial, to the pages where the book diverged from the tutorial.) If you do the tutorial, you have to do quite a bit of work in part 7 (adding log in for StoreManager). Because it is an empty site, you have to copy code for Account Controller from the tutorial download as suggested. But be sure to change the namespace and the @model [name].models .[class] to the actual project name. Also, to get the aspnetdb for the provider in part 7 to work, you have to change the connection string and set the roleManager enabled="true" in the web config file. Not easy to find this out, it should be prominently featured somewhere.

You also have to add the web config lines from an MVC 3 internet project for the roles, membership, etc., in addition to the stuff above. Also, I use 2008 R2 Dev Ed, not the default SQLExpress, so you have to change the connection string to something like the following for it to work:

connectionString="data source=(local);Integrated Security=SSPI;database=aspnetdb"
providerName="System.Data.SqlClient" />

JonGalloway December 9th, 2011 09:30 PM

Thanks for writing that up, Jack. The basic MVC Music Store tutorial has you build the site up from an empty web application and add in the account / membership components, which starts simpler but results in more work later on.

All times are GMT -4. The time now is 05:54 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.