 |
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

April 13th, 2014, 05:07 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

April 13th, 2014, 05:10 PM
|
|
Authorized User
|
|
Join Date: Jan 2009
Posts: 32
Thanks: 4
Thanked 0 Times in 0 Posts
|
|
Yes, manually entering Local DB does allow me to connect.
|
|

April 13th, 2014, 05:18 PM
|
|
Authorized User
|
|
Join Date: Jan 2009
Posts: 32
Thanks: 4
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by Imar
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.
|
|

April 14th, 2014, 02:28 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

April 14th, 2014, 10:17 AM
|
|
Authorized User
|
|
Join Date: Jan 2009
Posts: 32
Thanks: 4
Thanked 0 Times in 0 Posts
|
|
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.
|
|

April 14th, 2014, 02:52 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

April 14th, 2014, 04:25 PM
|
|
Authorized User
|
|
Join Date: Jan 2009
Posts: 32
Thanks: 4
Thanked 0 Times in 0 Posts
|
|
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.
|
|

April 14th, 2014, 04:56 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Great, glad to hear it's now working.
Have fun with the rest of the book.
Cheers,
Imar
|
|

November 4th, 2017, 09:07 AM
|
|
Registered User
|
|
Join Date: Nov 2017
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Just a lot of useful information for such a beginner like me, thank you for sharing your experience 192.168.0.1
|
|
 |
|