473,322 Members | 1,719 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,322 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 7941
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.