Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution 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
  #1 (permalink)  
Old March 21st, 2005, 09:41 PM
Authorized User
 
Join Date: Mar 2005
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access denied to a directory

Hi
I created a new project in VS.net (under C:\Inetpub\wwwroot )

Then I followed the code in the book to develop a module.

When I ran this project, i get the error:
Access to the path "c:\inetpub\wwwroot\SampleProject\Config\News.Conf ig" is denied. "

Do u know how to get rid of this problem ???

I have tried adding ASPNET user to c:\inetpub\wwwroot\SampleProject but this also does not work.

Any ideas???

  #2 (permalink)  
Old March 22nd, 2005, 05:55 AM
Authorized User
 
Join Date: Mar 2005
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To be precise, I get following:

Line 27: string fileName = HttpContext.Current.Server.MapPath(GetSettingsFile ());
Line 28: // create a filestream to read the XML document
Line 29: FileStream fs = new FileStream(fileName, FileMode.Open);
Line 30: // use the Deserialize method to retrieve the oject state
Line 31: data = (ModuleSettings)serializer.Deserialize(fs);


Source File: C:\Inetpub\wwwroot\SampleProject\Modules\Products\ Products.Configuration\Configuration.cs Line: 29

  #3 (permalink)  
Old March 22nd, 2005, 07:35 AM
Authorized User
 
Join Date: Mar 2005
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i had to add ASPNET user to the file, as well. Took a log time to fix it ...........



Similar Threads
Thread Thread Starter Forum Replies Last Post
401.3 Access denied due to Access Control List cforsyth .NET Framework 2.0 8 May 28th, 2009 01:56 PM
Access is denied. Ramakrishna General .NET 4 November 30th, 2004 09:05 AM
Access Denied tys MySQL 0 March 25th, 2004 03:46 PM
permission denied creating directory chexm8 PHP How-To 1 June 9th, 2003 04:39 PM





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