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

Problem writing text file from web service

I'm trying to write an error log from a web service. I'm getting an
exception of "Access to the path {filename} is denied." when I attempt to
create the file.

I tried specifying the root directory of C:\, and also by not specifying a
directory (which defaulted to the path c:\windows\system32\inetsrv).

Can someone please point me to what security changes I need to make? I'm
running Windows 2003 Server.

Thanks,

Richard Rosenheim
Nov 23 '05 #1
6 7945
Give the "Network Service" user necessary permission
Or use impersonation in your web service
--
Can You?You Can.
"Richard L Rosenheim" wrote:
I'm trying to write an error log from a web service. I'm getting an
exception of "Access to the path {filename} is denied." when I attempt to
create the file.

I tried specifying the root directory of C:\, and also by not specifying a
directory (which defaulted to the path c:\windows\system32\inetsrv).

Can someone please point me to what security changes I need to make? I'm
running Windows 2003 Server.

Thanks,

Richard Rosenheim

Nov 23 '05 #2
Give the "Network Service" user necessary permission
Or use impersonation in your web service
--
Can You?You Can.
"Richard L Rosenheim" wrote:
I'm trying to write an error log from a web service. I'm getting an
exception of "Access to the path {filename} is denied." when I attempt to
create the file.

I tried specifying the root directory of C:\, and also by not specifying a
directory (which defaulted to the path c:\windows\system32\inetsrv).

Can someone please point me to what security changes I need to make? I'm
running Windows 2003 Server.

Thanks,

Richard Rosenheim

Nov 23 '05 #3
Hi,

Depending on:

Your IIS server version (5.0/6.0) you have an "Application" attached
to your website. This application has a user account. This is the
account used to run the ASP.Net pages.

This account must be granted write rights to the location where you
want to write something from your ASP.Net application.

In general its "NETWORK SERVICE" or "{your computer}\ASPNET".

Hope this helps,

Marvin Smit
On Mon, 4 Jul 2005 04:56:45 -0700, "Richard L Rosenheim"
<ri*****@rlr.com> wrote:
I'm trying to write an error log from a web service. I'm getting an
exception of "Access to the path {filename} is denied." when I attempt to
create the file.

I tried specifying the root directory of C:\, and also by not specifying a
directory (which defaulted to the path c:\windows\system32\inetsrv).

Can someone please point me to what security changes I need to make? I'm
running Windows 2003 Server.

Thanks,

Richard Rosenheim


Nov 23 '05 #4
Hi,

Depending on:

Your IIS server version (5.0/6.0) you have an "Application" attached
to your website. This application has a user account. This is the
account used to run the ASP.Net pages.

This account must be granted write rights to the location where you
want to write something from your ASP.Net application.

In general its "NETWORK SERVICE" or "{your computer}\ASPNET".

Hope this helps,

Marvin Smit
On Mon, 4 Jul 2005 04:56:45 -0700, "Richard L Rosenheim"
<ri*****@rlr.com> wrote:
I'm trying to write an error log from a web service. I'm getting an
exception of "Access to the path {filename} is denied." when I attempt to
create the file.

I tried specifying the root directory of C:\, and also by not specifying a
directory (which defaulted to the path c:\windows\system32\inetsrv).

Can someone please point me to what security changes I need to make? I'm
running Windows 2003 Server.

Thanks,

Richard Rosenheim


Nov 23 '05 #5
Thanks for all the replies.

Richard

"Marvin Smit" <ma*********@gmail.com> wrote in message
news:hn********************************@4ax.com...
Hi,

Depending on:

Your IIS server version (5.0/6.0) you have an "Application" attached
to your website. This application has a user account. This is the
account used to run the ASP.Net pages.

This account must be granted write rights to the location where you
want to write something from your ASP.Net application.

In general its "NETWORK SERVICE" or "{your computer}\ASPNET".

Hope this helps,

Marvin Smit
On Mon, 4 Jul 2005 04:56:45 -0700, "Richard L Rosenheim"
<ri*****@rlr.com> wrote:
I'm trying to write an error log from a web service. I'm getting an
exception of "Access to the path {filename} is denied." when I attempt to
create the file.

I tried specifying the root directory of C:\, and also by not specifying adirectory (which defaulted to the path c:\windows\system32\inetsrv).

Can someone please point me to what security changes I need to make? I'm
running Windows 2003 Server.

Thanks,

Richard Rosenheim

Nov 23 '05 #6
Thanks for all the replies.

Richard

"Marvin Smit" <ma*********@gmail.com> wrote in message
news:hn********************************@4ax.com...
Hi,

Depending on:

Your IIS server version (5.0/6.0) you have an "Application" attached
to your website. This application has a user account. This is the
account used to run the ASP.Net pages.

This account must be granted write rights to the location where you
want to write something from your ASP.Net application.

In general its "NETWORK SERVICE" or "{your computer}\ASPNET".

Hope this helps,

Marvin Smit
On Mon, 4 Jul 2005 04:56:45 -0700, "Richard L Rosenheim"
<ri*****@rlr.com> wrote:
I'm trying to write an error log from a web service. I'm getting an
exception of "Access to the path {filename} is denied." when I attempt to
create the file.

I tried specifying the root directory of C:\, and also by not specifying adirectory (which defaulted to the path c:\windows\system32\inetsrv).

Can someone please point me to what security changes I need to make? I'm
running Windows 2003 Server.

Thanks,

Richard Rosenheim

Nov 23 '05 #7

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

Similar topics

2
by: Randy Jackson | last post by:
Hello all. Okay, this seems really stupid, but it's driving me up the wall. I have a simple script I've written to log some information to a text file. Everything seems to be okay, the code...
4
by: Rob Meade | last post by:
Hi all, Ok - minor fly in my ointment... I have an application which was successfully writing data from submitted forms to a text file in a directory - in this case: /data/findata.txt ...
1
by: fabrice | last post by:
Hello, I've got trouble reading a text file (event viewer dump) by using the getline() function... After 200 - 300 lines that are read correctly, it suddenly stops reading the rest of the...
3
by: giladap | last post by:
I am trying to create a BHO using C#. I currently have it successfully loading into IE (I've checked with "Manage Add-ons"), but nothing else seems to be working. I get no errors that I can see. ...
4
by: Nina | last post by:
Hi everyone, Do you know why the following code only read certain number of lines of text file, but not the entire file? Dim sr As StreamReader Dim str As String Dim al As ArrayList = New...
0
by: Richard L Rosenheim | last post by:
I'm trying to write an error log from a web service. I'm getting an exception of "Access to the path {filename} is denied." when I attempt to create the file. I tried specifying the root...
4
by: =?Utf-8?B?QmlsbCBNYW5yaW5n?= | last post by:
I have an internal ASP.NET 2.0 web service that does, among other things, expose a method that causes files to be written to a location that the user configures. The web service has been around...
2
by: Quentin | last post by:
I am currently working with a text file and cannot seem to get it to filter right. I am trying to delete every line above a keyword "Recipe" and every line below a keyword. Or just move every...
5
by: chisty | last post by:
can any one tell how to write a text file inputs to different edit boxes using a button.....text file contain different data.displaying each data in different edit boxes using single button click
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: 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...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.