473,405 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

open file across network

Hi,

I tried to open a file in aspnet:

FileOpen(intFile, "\\MachineName\path\subfolder\filename",
OpenMode.Output)

However, I received the following error message:
System.UnauthorizedAccessException: Access to the path
"\\MachineName\path\subfolder\filename" is denied.

but it works ok if I provide a mapped path: namely
"c:\path\subfolder\filename"

What kind of setting I have to make in order to allow me to use
"\\MachineName" without mapping?

Thanks in advance. Any help would be greatly appreciated.

Wanda
Nov 18 '05 #1
1 3194
The default ASPNET user account doesn't have network permissions.
One solution is to change ASP.NET to run under a different account that has
the necessary permissions. For testing purposes I suggest having it run
under your user account since you know you have permission.

For example, you can add a line similar to this to your web.config file:
<identity impersonate="true" userName="domain\MyAppUser">
password="password"/>

Here's more info on impersonation:
http://msdn.microsoft.com/library/de...ersonation.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Wanda" <wa*****@rogers.com> wrote in message
news:11*************************@posting.google.co m...
Hi,

I tried to open a file in aspnet:

FileOpen(intFile, "\\MachineName\path\subfolder\filename",
OpenMode.Output)

However, I received the following error message:
System.UnauthorizedAccessException: Access to the path
"\\MachineName\path\subfolder\filename" is denied.

but it works ok if I provide a mapped path: namely
"c:\path\subfolder\filename"

What kind of setting I have to make in order to allow me to use
"\\MachineName" without mapping?

Thanks in advance. Any help would be greatly appreciated.

Wanda

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: louis n | last post by:
I work with databases and some of my backup files are 30-100 gigs in size. I currently use the FastCopy utility to copy files from one server to another. (This is needed when I need to transfer a...
0
by: Raj Chudasama | last post by:
In dot net 2003 on Xp when you go to the file menu and select Open file a dialog box opens up on the left hand side there are items such as history My Projects Desktop Favorites My Network...
1
by: Wanda | last post by:
Hello, I tried to open a new file on network for output: (aspnet) FileOpen(intFile, "\\MachineName\path\subfolder\filename", OpenMode.Output) However, I received the following error...
3
by: Parag Gaikwad | last post by:
Hi, I need to delete files across the network using web client (IE 6.x) in Win 2003 - IIS 6.0 environment. Can someone please suggest an approach I can use to acheive this. Will using FSO do...
4
by: Sue | last post by:
Hello We have an application where the user would upload files (max size of 200 mb) from their client machine. This application will run on a web server (its a web server which would be used by...
4
by: Wayne | last post by:
How do I get rid of the generic Windows "Open File - Security Warning" that appears when I try to open a database that resides on another PC on my home network? This is not the annoying macro...
0
by: raja | last post by:
Hi, I want to upload one file from network,which it was not working but when i try to upload the same file from server system it is working. Is there any problems with network settings? I...
2
by: pandehrushikesh | last post by:
I am doing setup project in VS 2008. I used custom action to select file from local drives. On the button click of custom action form, I am launching Open file dialog as ...
2
by: pandehrushikesh | last post by:
I am using Vista Business SP1. When I run some application "As Administrator" (even if I am administrator), Open file dialog does not show the mapped drive or network locations. any Idea???
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.