Wrox Programmer Forums
|
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
 
Old July 6th, 2004, 01:32 PM
akm akm is offline
Registered User
 
Join Date: Jul 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access to AdsManager.Config is denied

I downloaded the code for ASP.NET Website Programming, Visual Basic .NET Edition, and followed the instructions to install and build the site. When I try to access the URL in local host I get the following error message:

http://localhost/thephileVB/Default.aspx
Error Message:
Access to the path "C:\Wrox\ThePhileVB\Config\AdsManager.Config" is denied.

I'm using Windows XP Professional upgraded from Windows XP Home.

Does anyone know how to fix this problem?

Anita



Microsoft certified developer, mcsd.net, www.anitamorgan.com
 
Old July 7th, 2004, 09:22 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Make sure the ASPNET user account has write access to the NTFS directories under C:\Wrox\ThePhileVB.

Eric
 
Old July 7th, 2004, 09:25 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Additionally, make sure you limit access to readonly when you don't need write access. This is explained in item 4 in the index.htm file that comes in the code download:

Users with VB.NET version of Code

Dim fs As New FileStream(fileName, FileMode.Open, FileAccess.Read)

Users with C# version of Code

FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);

Eric
 
Old July 8th, 2004, 09:05 PM
akm akm is offline
Registered User
 
Join Date: Jul 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Eric, Thanks for responding to my posting. I had already followed the instructions in the readme.htm file that comes with the download. When I added write access, as you suggested, the home page does come up. Unfortunately, I haven't had training in SQL Server 2000 administration or IIS administration.

Anita
 
Old September 1st, 2004, 12:40 PM
Authorized User
 
Join Date: Apr 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Where do I put the code in to give me the approprate permissions?
Here's the error I get when I try to view
my stuff:

An unexpected error has occurred on this page. The system administrators have been notified. Please feel free to contact us with the information surrounding this error.
The error occurred in: http://localhost/ThePhile/Default.aspx
Error Message: Unable to generate a temporary class (result=1). error CS0009: Metadata file 'C:\WINDOWS1\Microsoft.NET\Framework\v1.0.3705\Tem porary ASP.NET Files\thephile\ba211877\6ca9ec9\assembly\dl\47ff8c b0\ea809706_3c90c401\Wrox.WebModules.Polls.Configu ration.DLL' could not be opened -- 'Access is denied. '
 
Old September 1st, 2004, 08:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

See this thread:
http://p2p.wrox.com/topic.asp?TOPIC_ID=10777

The second message is the fix I would recommend. Somehow their converstation switched to SQL Server, but I don't think that's relevant for you.

The third message is not related either - that is explaining how to fix a virtual directory problem.

You seem to have a problem with the ASPNET user not having write permission to your temporary ASP.NET Files folder, so this sounds like an NTFS permissions problem.

By the way, this is hinting that something else is wrong, since the ASPNET user should always have write permission to this folder. Can you make other ASP.NET applications on this computer - even simple ones?

Or maybe your IIS security authorization is set wrong? Are you using impersonation?

Eric
 
Old August 27th, 2005, 04:31 PM
Registered User
 
Join Date: Aug 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by englere
 Additionally, make sure you limit access to readonly when you don't need write access. This is explained in item 4 in the index.htm file that comes in the code download:

Users with VB.NET version of Code

Dim fs As New FileStream(fileName, FileMode.Open, FileAccess.Read)

Users with C# version of Code

FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);

Eric
This worked for me. It is also the same fix for a similar problem noted in http://p2p.wrox.com/topic.asp?TOPIC_...onfig%2Cdenied

QUESTION: Do we need to make this change in EVERY ModuleConfig.vb file in the site?

 
Old August 30th, 2005, 06:43 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You should *ALWAYS* request only read access if you know you don't need to write to the file.
 
Old July 3rd, 2006, 09:53 AM
Registered User
 
Join Date: Jul 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I dont seem to be able to find the download for the book Website Programming - Problem - Design - Solution. Visual Basic .Net Edition anywhere on the Wrox website. There are downloads for thr C# version of the book and for a newer edition of the book. Can you advise as to where I can find this code?

 
Old July 5th, 2006, 04:18 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just pick the C# book download, and the next screen also has the link for the VB code:

http://www.wrox.com/WileyCDA/WroxTit...load_code.html





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 Denied tys MySQL 4 April 6th, 2007 08:31 AM
Polls.Config is denied. eugz BOOK: ASP.NET Website Programming Problem-Design-Solution 1 November 18th, 2006 08:07 AM
AdsManager SQL Code Missing justin_dago BOOK: ASP.NET Website Programming Problem-Design-Solution 4 April 9th, 2004 03:50 PM
Access is Denied khautinh General .NET 1 March 26th, 2004 04:44 PM





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