Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > UnauthorizedAccessException in webservice accessing files on UNC s

Reply
Thread Tools

UnauthorizedAccessException in webservice accessing files on UNC s

 
 
Robert Altland
Guest
Posts: n/a
 
      09-15-2005
I've been trying to find a solution to my problem and ran across this post on
..NET 247 that describes it exactly:
--------------------------------------------------------------
I am in the process of developing a webservice which [accesses files from a]
UNC path. The problem I am having is accessing the files on the UNC path to a
remote machine within the same domain and on the same network. The error is
System.UnauthorizedAccessException "Access to the path
'\\server\sharename\folder' is denied. If the UNC path points to a folder on
the server running the Web Service everything is fine. For test purposes the
group "everyone" has full access to the UNC Share. I have tried "<Impersonate
/>" without success.

I'm using the System.IO namespace to access the files on the given UNC path.

----------------------------------------------------------------
I followed the various directions in the post to no avail. This webservice
is running in a separate application pool as Network Service on my local
machine, which is running 2003 Server. The UNC share resides on a 2003 Server
within the domain.

This post recommended using the .NET Confiuration tool to give the
localintranet code group full trust. I did that but it didn't work. I've also
created a new code group granting full trust to all assemblies originating
from the webservice URL and that didn't work.

It may be helpful to note that I can successfully query the existence of a
file through File.Exists(), I just can't create a stream.

So to sum up, the webservice is running on my local machine with full trust,
the UNC share is totally wide open and it's still throwing unauthorized
access exceptions when attempting to create a FileStream.

I'm ready to supply any additional information to help diagnose and fix
this. Any ideas?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
asp.net Accessing UNC path - File Not Found PP ASP .Net 2 03-12-2007 01:05 AM
Accessing a file at a UNC flipdoubt ASP .Net 4 09-10-2005 10:20 AM
Problems accessing files in ASP.NET using a UNC path Chris Newby ASP .Net 2 09-09-2005 02:46 PM
Accessing Shared Folders on a computer in another domain using UNC Baron ASP .Net 3 04-29-2005 02:45 PM
Problems Accessing a UNC Share from ASP.NET Pages Paul M. Frazier ASP .Net Security 0 06-07-2004 05:00 PM



Advertisments