Exception when opening file from web service

T

Tenacious

I have a simple asp.net web service that is trying to create or open
an existing file in the same directory as the web service. There is no
password authentication required for this web service. In the
web.config file I have set authorization to <allow users="*" />. I
have also tried <allow users="?" />

My web service application creates and opens an existing file running
under localhost on my development system. When my application trys to
create or open an existing file while running on a Windows 2003 server
I get a System.UnauthorizedAccess Exception.

Through the IIS manager I have setup the virtual directory to allow
writes and reads. I am running version 2.0 of the .Net Framework. If
anyone has any ideas as to what the slution may be, I would appreciate
your suggestions.
 
R

Roland Dick

Hi Tenacious,
under localhost on my development system. When my application trys to
create or open an existing file while running on a Windows 2003 server
I get a System.UnauthorizedAccess Exception.

Did you check your NTFS file permissions for this file and/or folder?
For Win2003, it is by default the account "Network Service" that needs
full permission for the file, I believe. That is, unless you use
impersonation or changed the account for the application pool.

Hope this helps,

Roland
 
T

Tenacious

Hi Tenacious,


Did you check your NTFS file permissions for this file and/or folder?
For Win2003, it is by default the account "Network Service" that needs
full permission for the file, I believe. That is, unless you use
impersonation or changed the account for the application pool.

Hope this helps,

Roland

According to our IT person, it turned out to be persmissions in the
ASP group. It is working fine now. Thanks for your suggestion.
 

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,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top