Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5 > BOOK: Beginning ASP.NET 4.5 : in C# and VB
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #21 (permalink)  
Old September 3rd, 2013, 01:58 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,084
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Ah, that makes perfect sense. Since you're using integrated security and the "apppoolidentity", the code runs under the IIS AppPool account. Granting permissions on disk lets that account access files. Adding it as a login in SQL Server lets it log in to SQL Server and adding it as a user to a database (which you already had), grants it permissions to use that specific database.

Glad it's working!

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #22 (permalink)  
Old September 3rd, 2013, 02:53 PM
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
Default

Imar, i feel very indebted to you. Thanks so much! You should write more books. You will run other authors out of business. Its very enjoyable to read, easy to understand and you take into consideration variations in setup that novices may not know how to navigate.

The only section I did not understand was the end of Apendix B. "Configuring Application Services" Its the only thing so far I don't understand especially Step 1. Perhaps it discussed somewhere in the rest of the book and I just missed it. Is this at all related to anything I was doing or is it something entirely different. If its entirely different?

Quote:
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 = 1.0.0.0, 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 >
Reply With Quote
  #23 (permalink)  
Old September 3rd, 2013, 03:11 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,084
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
Imar, i feel very indebted to you. Thanks so much! You should write more books. You will run other authors out of business. Its very enjoyable to read, easy to understand and you take into consideration variations in setup that novices may not know how to navigate.
Thank you. Would you be willing to write a review on Amazon.com?

The application services are Microsoft's solution for membership, roles, profile and more. You find full details in Chapter 16 on Security. The appendix then shows how to (re)configure these services to use a production database instead of its default database running on SQL Express.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
maurices5000 (September 3rd, 2013)
  #24 (permalink)  
Old September 3rd, 2013, 07:42 PM
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
Default

Yeah, of course, I'll do a 5 star review at Amazon. I've already been recommending the book to others and when I go back to forums where i sought out help, I'm also telling people where they can go to find the same information that was helpful to me.
Reply With Quote
  #25 (permalink)  
Old October 3rd, 2013, 11:35 PM
Authorized User
Points: 276, Level: 5
Points: 276, Level: 5 Points: 276, Level: 5 Points: 276, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2012
Posts: 39
Thanks: 4
Thanked 1 Time in 1 Post
Default IIS Resource Book

Interesting thread. To piggy back on this discussion, I'm looking for advice regarding the best (book) approach to learn more about administering an IIS server in a corporate environment. However, I'm completely new to this other than what I've learned through Imar's beginner book on ASP.NET.

Should I start with a beginner's book similar to Imar's ASP.NET one? Or does it make more sense to just get a professional series book. I'm not sure if I'd be missing some fundamentals if I went directly to a professional series book. Do professional books build on some level of current knowledge? (I don't buy many of these books)

Any advice or comments? Thanks.
Reply With Quote
  #26 (permalink)  
Old November 25th, 2013, 04:39 AM
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
Default

I think it is worth noting that I need to remember to change the role for the account for my application pool in SQL Server to db_owner instead of db_datareader and db_datawriter. They never work.

maybe having this in several places will save me some time next time. Lol
Reply With Quote
  #27 (permalink)  
Old November 25th, 2013, 03:49 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,084
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

datareader and datawriter should be enough if your application doesn't modify the database structure.

Are you maybe using Entity Framework code first that modifies the database schema? In that case, ddladmin would be the role to add. dbo is typically too much.

Also, are you configuring group membership and not schema ownership?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!

Last edited by Imar; November 30th, 2013 at 05:29 AM..
Reply With Quote
  #28 (permalink)  
Old November 26th, 2013, 01:34 AM
Friend of Wrox
Points: 1,905, Level: 17
Points: 1,905, Level: 17 Points: 1,905, Level: 17 Points: 1,905, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default IIS instructions

Installing IIS on windows 7 for me was pretty straight forward, so I am not sure what you are having problems with. Maybe this will help?:

http://www.iis.net/learn/install/ins...-and-windows-7
Reply With Quote
  #29 (permalink)  
Old November 26th, 2013, 01:50 AM
Friend of Wrox
Points: 1,905, Level: 17
Points: 1,905, Level: 17 Points: 1,905, Level: 17 Points: 1,905, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default

[QUOTE=maurices5000;293509]Imar, i feel very indebted to you. Thanks so much! You should write more books. You will run other authors out of business. Its very enjoyable to read, easy to understand and you take into consideration variations in setup that novices may not know how to navigate.

Yes, I agree. Imar should write more books. I would really like to see or request that Imar or at least someone else at Wrox write a couple of really good books on two subject matters: Developing E-commerce websites using ASP.NET 4.5 done in web forms and then done in MVC 4 or 5. 2) Somebody at Wrox really needs to write a really good book on MVC 4 and 5 mobile development, preferably mobile development with MVC 4-5 using JQuery Mobile and for E-Commerce. Lastly I would like to request Imar or someone else at Wrox should write a really good intro book on WCF 4.5 features along with maybe some SignalR - and Web API stuff with restful like services that use the HTTP verbs like GET, PUT, UPDATE in there for good measure.
Here is a perfect example of what I am talking about: Download and install the Opera Emulator at
http://www.opera.com/developer/mobile-emulator
Then look at the following website with the Opera Emulator:
http://www.vermontcountrystore.com/store/
Then you will see what it exactly that it is that I am talking about. A really good book that would teach how to do or build websites like this or something like that would be worth its weight in gold.

Last edited by vbboyd; November 26th, 2013 at 01:52 AM..
Reply With Quote
  #30 (permalink)  
Old November 29th, 2013, 01:04 AM
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
Default

Quote:
Originally Posted by Imar View Post
datareader and datawriter should be enough if your application doesn't modify the database structure.

Are you maybe using Entity Framework code first that modifies the database schema? In that case, ddladmin would be the role to add. dbo is typically to much.

Also, are you configuring group membership and not schema ownership?

Imar
Nope! Not using entity framework. I am using stored procedures though. In the email to me you said: "Not sure if you've seen my reply, but in case you haven't: DataReader and DataWriter should be enough if your web site only reads and writes to tables and views. If it also alters the database it needs DDLAdmin permissions, and if you have stored procedures those require execute permissions. DBO shouldn’t be necessary and typically means the account has too many permissions." Is there an account that is better than DBO for execute? Would I still need dataReader and DataWriter?

Last edited by maurices5000; November 29th, 2013 at 01:07 AM..
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't reinstall Access database Xzyl Access 6 November 18th, 2008 04:39 PM
MySQL - Uninstall Fix MySQL 2 April 12th, 2006 02:53 AM
Uninstall BETA's first Robert Reno BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 3 February 14th, 2006 12:50 PM
Trouble connecting to Access DB thru IIS swoopest Classic ASP Databases 6 November 10th, 2004 10:13 AM
MSDE Uninstall Doesn't jeffg22 SQL Server 2000 11 September 15th, 2004 09:11 AM



All times are GMT -4. The time now is 06:01 AM.


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