Directory permission for disk I/O from web service

M

Milop

Hello.

I have an ASP.Net 2.0 web service on Win2003 server that needs to write to a
shared directory on the same machine.

The web.config file is using "None" as the authentication mode.

I am referencing the directory using UNC naming (\\WEBSERVER\Folder\.....)

I thought the web service was going to run under the local ASPNET account,
so I gave ASPNET permissions, but that didn't work.

Unless I add "Everyone" under the permissions for "Sharing" the web service
cannot write to the folder, and I do not want to add "Everyone".

What am I missing?

Thanks in advance,

Mike
 
B

bruce barker

unc paths require network permission, so your pool account should be a
domain account.

-- bruce (sqlwork.com)
 
S

Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

In Win2003 ASP.NET runs under the "NetworkService" user account by default,
not the ASPNET user account. So try giving it permissions.
 
Joined
Aug 2, 2007
Messages
1
Reaction score
0
I would create an Virtual Directory in IIS and this virtual directory should point to your destination folder.
Give the virtual directory the Permissions you need.

In the Webservice you can point to this folder like this:

Path.Combine(Server.MapPath("Log/"), "Filename.xml");

"Log/" is the name(path) of the virtual directory and Filename.log the name of the file.

Hope i could help
 

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

No members online now.

Forum statistics

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

Latest Threads

Top