473,378 Members | 1,346 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,378 software developers and data experts.

Exception when opening file from web service

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.
Nov 15 '07 #1
2 1160
Hi Tenacious,

Tenacious schrieb:
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
Nov 16 '07 #2
On Nov 15, 3:57 pm, Roland Dick <bris...@web.dewrote:
Hi Tenacious,

Tenacious schrieb:
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
According to our IT person, it turned out to be persmissions in the
ASP group. It is working fine now. Thanks for your suggestion.

Nov 16 '07 #3

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

Similar topics

7
by: Ekim | last post by:
hy, I've a question concerning exception-handling in c++: is there a possibility to catch any exception (I know one can do that by "catch(...)") and display its default-error-message (like in...
7
by: Dan Bass | last post by:
In a somewhat complex application, I've developed plug-in architecture and am having a problem as to when to catch general exceptions for logging purposes. In each plug-in class library, for...
2
by: Richard Collette | last post by:
Hi, I have a service, that runs perfectly when executed outside of the web service environment. When called as a web service I get the exception listed below sporadically. A call to the web...
35
by: eliben | last post by:
Python provides a quite good and feature-complete exception handling mechanism for its programmers. This is good. But exceptions, like any complex construct, are difficult to use correctly,...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.