Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 February 12th, 2004, 05:31 PM
Registered User
 
Join Date: Feb 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default UnauthorizedAccessException

hi,
I've been trying some C# ASP.NET examples from the beginning C# book from wrox pg 783, and on one of my computers I keep getting a System.UnauthorizedAccessException when it tries to access a file.

FileStream file = new FileStream(filepath, FileMode.Open);

This code works fine on another computer. Both computers have identical installations of visual studio net on XP professional. The one that works has McAffee and the one that doesn't has Norton antivirus. I shutoff the script blocking and everything else for Norton and the same exception occurs. I've played with everything I could find in the control panel on security and even added a permission set to the assembly that should allow read/write permission but nothing works. Any suggestions?
thanks,

thad213
 
Old February 16th, 2004, 06:25 PM
Registered User
 
Join Date: Feb 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I got it working. I followed the suggestions in the post "IIS test not working". I had to get the security page showing in the file property dialog. Then add ASPNET as a user for C:\Inetpub with read/write permission. I also had to do that for one of the subdirectories even tho I had the C:\Inetpub changes applied to the sub-directories.






Similar Threads
Thread Thread Starter Forum Replies Last Post
UnauthorizedAccessException when creating Word doc VerbatimBOT ASP.NET 2.0 Professional 2 November 3rd, 2008 06:56 PM





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