open file across network

W

Wanda

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
 
S

Steve C. Orr [MVP, MCSD]

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/d...-us/cpguide/html/cpconaspnetimpersonation.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top