Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : 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 Display Modes
  #11 (permalink)  
Old April 13th, 2014, 06:07 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,957
Thanks: 79
Thanked 1,556 Times in 1,533 Posts
Default

Also, just temporarily, try granting the Everyone account full control to your App_Data folder and try again. That way you can confirm it's a security issue.

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
  #12 (permalink)  
Old April 13th, 2014, 06:10 PM
Authorized User
Points: 129, Level: 2
Points: 129, Level: 2 Points: 129, Level: 2 Points: 129, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2009
Posts: 32
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Yes, manually entering Local DB does allow me to connect.
Reply With Quote
  #13 (permalink)  
Old April 13th, 2014, 06:18 PM
Authorized User
Points: 129, Level: 2
Points: 129, Level: 2 Points: 129, Level: 2 Points: 129, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2009
Posts: 32
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Imar View Post
Also, just temporarily, try granting the Everyone account full control to your App_Data folder and try again. That way you can confirm it's a security issue.

Cheers,

Imar
Not sure how to do that one. I don't see "Everyone" in the Security tab.
Reply With Quote
  #14 (permalink)  
Old April 14th, 2014, 03:28 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,957
Thanks: 79
Thanked 1,556 Times in 1,533 Posts
Default

Check out the section "Understanding Security in IIS" in Chapter 19 (page 741) for details on how to configure the file system and add the Everyone account.

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
  #15 (permalink)  
Old April 14th, 2014, 11:17 AM
Authorized User
Points: 129, Level: 2
Points: 129, Level: 2 Points: 129, Level: 2 Points: 129, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2009
Posts: 32
Thanks: 4
Thanked 0 Times in 0 Posts
Default

OK, I've read over the section you referenced. When doing the exercise, I highlight the App_Data folder in Windows Explorer, click "Properties" (Step #3), and then click on the Security tab (Step #3). I click the "Edit" button and then the "Add" button (Step #4) and instead of IIS AppPool\.NET v4.5, I typed "Everyone". Actually, I did type IIS AppPool\.NET v4.5 first but was confronted with an error that the object wasn't found, so then I just type variations including "Everyone" and finally just "Everyone" by itself and it seems to have worked.

I then went to "ensure that only List Folder Contents and Read are selected." I then clicked on the "Apply" button and was confronted with a dialog box with the title, "Error Applying Security": An error occurred while applying security information to: C:\begASPNET\Planet_Wrox\App_Data\PlanetWrox.mdf Access is denied." I'm given an option to click on a button, "Continue" or "Cancel". I clicked on "Continue" and the same box reappeared. Click on "Continue" again and the dialog box was dismissed and it appears the changes indeed were allowed. The List Folder Contents and Read are the only two items now selected in the list.

I then went on to Step #6 and was confronted with the same dialog box ("Access denied") when trying to change the setting for Replace All Child Object Permissions. Again, I click on "Continue" (as opposed to "Cancel"), but this time it won't let me change the checkbox from unchecked to checked. I've tried several times to no avail.

I haven't gone on to Step #7 since I am unable to complete Step #6.
Reply With Quote
  #16 (permalink)  
Old April 14th, 2014, 03:52 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,957
Thanks: 79
Thanked 1,556 Times in 1,533 Posts
Default

I think there could be two reasons for this error:

1. The MDF file is still attached to some instance of SQL Server. Try finding out by logging in to your SQL Server instance(s) and see if the database is already attached. If so, right-click it and detach it (under All Tasks I believe)

2. You don't have permissions to set the permissions. Even if you are an administrator, you may currently not have ownership of that folder of the files. To resolve this, click the Advanced button on the Security tab for the App_Data folder. There you have additional options to set security, take ownership (by clicking change after the name of the current owner at the top of the dialog) and test effective permissions.

It's a bit hard to tell you exactly what to do as I don't know how your system is setup, so you may need to do a bit of experimenting and consulting the Windows Help.

Hope this helps, but if not, let me know.

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:
Psyclist (April 14th, 2014)
  #17 (permalink)  
Old April 14th, 2014, 05:25 PM
Authorized User
Points: 129, Level: 2
Points: 129, Level: 2 Points: 129, Level: 2 Points: 129, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2009
Posts: 32
Thanks: 4
Thanked 0 Times in 0 Posts
Default

OK, I'm not sure what I did, but now I'm connected and can see the tables in the database now. I'm assuming I am good to go now. Thanks so much for your time and patience, Imar. I appreciate the help very much. I will try the next exercise a little later and confirm that things are working properly now. I will let you know for sure.
Reply With Quote
  #18 (permalink)  
Old April 14th, 2014, 05:56 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,957
Thanks: 79
Thanked 1,556 Times in 1,533 Posts
Default

Great, glad to hear it's now working.

Have fun with the rest of the book.

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
  #19 (permalink)  
Old November 4th, 2017, 10:07 AM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Nov 2017
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just a lot of useful information for such a beginner like me, thank you for sharing your experience 192.168.0.1
Reply With Quote
Reply


Thread Tools
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
Connecting to Database bryantms ASP.NET 3.5 Basics 3 July 9th, 2008 01:34 AM
connecting to database stealthdevil Visual Basic 2005 Basics 2 November 5th, 2007 01:31 PM
Connecting to a database mfos Classic ASP Basics 0 December 20th, 2006 07:59 AM
connecting to a database nehalw VB.NET 0 January 5th, 2005 05:59 AM
database connecting princeofdhump Classic ASP Databases 3 August 7th, 2004 03:46 AM



All times are GMT -4. The time now is 12:45 PM.


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