 |
BOOK: Beginning ASP.NET 1.0  | This is the forum to discuss the Wrox book Beginning ASP.NET 1.0 with C# by Chris Goode, John Kauffman, Christopher L. Miller, Neil Raybould, S. Srinivasa Sivakumar, Dave Sussman, Ollie Cornes, Rob Birdwell, Matt Butler, Gary Johnson, Ajoy Krishnamoorthy, Juan T. Llibre, Chris Ullman; ISBN: 9780764543708 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 1.0 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
|
|
|
|
|

July 19th, 2004, 01:23 PM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
http://localhost/5040/punctual.aspx
I get
Server Error in '/5040' Application.
Server cannot access application directory 'C:\Documents and Settings\Michael\My Documents\small_change\BegASPNET\'. The directory does not exist or is not accessible because of security settings.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Server cannot access application directory 'C:\Documents and Settings\Michael\My Documents\small_change\BegASPNET\'. The directory does not exist or is not accessible because of security settings.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Server cannot access application directory 'C:\Documents and Settings\Michael\My Documents\small_change\BegASPNET\'. The directory does not exist or is not accessible because of security settings.]
System.Web.HttpRuntime.EnsureAccessToApplicationDi rectory() +72
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +256
[HttpException (0x80004005): ASP.NET Initialization Error]
System.Web.HttpRuntime.FirstRequestInit(HttpContex t context) +926
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +128
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0
What should I do?
|
|

July 19th, 2004, 02:23 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Check the security settings on the begASPNET folder to see if the ASPNET user account can Read it.
|
|

July 19th, 2004, 02:49 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Hello,
How have you set up the project? Did you create a virtual underneath another folder and not the IIS root?
Brian
|
|

July 19th, 2004, 03:25 PM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
stu9820, in my IIS admin tool in the MMC, I right-click my 5040 virtual directory to find the local path set to C:\Documents and Settings\Michael\My Documents\small_change\BegASPNET, the Read permission enabled, and the Execute Permissions set to "Scripts Only". In Explorer, right-clicking BegASPNET and left-clicking Properties and the Web Sharing tab indicates the folder is sharable.
The book ([u]Beginning ASP.NET</u> - 2001 Wrox Press) states saving this first exercise as c:\...\BegASPNET\ch01\punctual.aspx, then typing http://localhost/5040/punctual.aspx in my browser. I figured maybe it should be http://localhost/5040/ch01/punctual.aspx, but it didn't matter - I get the same error either way.
|
|

July 19th, 2004, 03:50 PM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
bmains, I started the IIS admin tool to right-click MIKE\Web Sites\Default Web Site and left-click New - Virtual Directory to enter alias 5040 (p.33) and directory C:\Documents and Settings\Michael\My Documents\small_change\BegASPNET.
The book did not state doing this for sub-folder ch01, but I figured maybe I should. In Explorer, I right-clicked ch01 and left-clicked Properties and the Web Sharing tab to change the folder to sharable, which gave me alias ch01. I typed http://localhost/ch01/punctual.aspx, but I get the same error. I guess a higher level folder's security settings has precedence, so I deleted alias ch01, which changes folder ch01 back to not sharable.
|
|

July 19th, 2004, 03:57 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Right click the folder and go to properties. You should see a 'Security' tab. If you don't try this:
Open 'My Computer'. Click 'Tools' and then 'Folder Options'. Then click on the 'View' Tab and scroll all the way to the bottom. Uncheck 'Use Simple File Sharing(Recommended)' and click 'Ok' or 'Yes' to the warning.
Once that has been done you should be able to go the the folder where your db.mdb is at and right click on the folder and give <machine name>\aspnet account write access to the folder.
You must be using NTFS and NOT FAT16 or FAT32.
|
|

July 19th, 2004, 07:54 PM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
stu9820, I left-clicked 'My Computer', 'Tools', 'Folder Options', and the 'View' Tab to uncheck 'Use Simple File Sharing(Recommended)', which gives me a Security tab indicating Michael, SYSTEM, and Administrators have all permissions except "Special Permissions". How do I find the folder where my db.mdb is at, and how do find the file system my XP Professional is using? I suspect it is not NTFS.
Assuming it is not, the Help and Support Center recommends formatting the partition with NTFS rather than converting from FAT or FAT32, which will erase all data on the partition. My pc is less than a week old, so I don't have much data to lose, although I'll have to reload my Microsoft Visual Studio .NET, HP OfficeJet K80, wrt54g router, adobe reader 6.0 and photoshop, WinZip, and skype. If I save off documents and .aspx code I've written, will I be able to reload them? And is it true Dell will no longer support your system if you change your file system to NTFS?
|
|

July 20th, 2004, 07:40 AM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
stu9820, I right-clicked my C drive and left-clicked Properties to find my file system [u]is</u> NTFS.
|
|

July 20th, 2004, 07:44 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
'C:\Documents and Settings\Michael\My Documents\small_change\BegASPNET\'
You need to right click the begASPNET folder and give the ASPNET user account read permissions to the folder. Try that and let us know.
|
|

July 20th, 2004, 05:15 PM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You almost got me there, stu9820. After adding user aspnet_wp account (MIKE\ASPNET) to BegASPNET, I got "Server Error in '/5040' Application. Access denied to 'C:\...\BegASPNET\' directory. Failed to start monitoring directory changes..." http://support.microsoft.com/default...;en-us;Q317955 states "Microsoft has confirmed that this is a bug in the Microsoft products ... This bug was corrected in ASP.NET (included with the .NET Framework) 1.1."
For my ASP.NET Version 1.0.3705.0, I successfully worked around the bug by adding user aspnet_wp account to all of the folders in the hierarchy of the path, then granted more restrictive permissions to these folders by allowing only the List Folder / Read Data permission. After that, I was able to run http://localhost/5040/ch01/punctual.aspx in my browser.
Thanks for your help.
|
|
 |