RE: Problem Writing a File from a Web Service



protected void Page_Load(object sender, System.EventArgs e)
{
Label1.Text = Page.User.Identity.Name +" : "+
Page.User.Identity.AuthenticationType.ToString();

}

Cheers,
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




"Bill Manring" wrote:

Peter,

Thanks for the reply. By placing the ASPNET account in the local
Adminstrators group, it should have the same permissions as my Domain account.

That leads me to believe that the web service isn't running under the ASPNET
account, but I have done nothing to force it to be otherwise. How can I tell
which account it is running under?

--
Thanks,

Bill Manring
Wavefront Software, Inc.


"Peter Bromberg [C# MVP]" wrote:

Well, if setting the impersonate element to your domain accout fixed the
problem, then it stands to reason that whatever permission set you granted to
the ASPNET user was insufficient. Either that, or the Webservice isn't
actually running under the ASPNET user credentials.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net




"Bill Manring" wrote:

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 for a while, under ASP.NET 1.0
and it has just been updated to ASP.NET 2.0. The functionality in question
has not changed.

When testing the upgraded web service on Windows XP, I got an error when the
file was created:

Access to the path 'C:\MyFolder\myFile.ext' is denied.

This looks like a security issue, so I checked the folder permissions for
the ASPNET user (this is XP) and it had write permissions to the folder. I
tried adding the ASPNET user to the local administrators group on the
machine, to at least confirm that I have a permissions issue - the problem
did not go away.

Finally, I solved the problem by having the web service impersonate my
Windows Domain account. I added a line like the following to the web.config
file:

<identity impersonate="true" userName="domain\myName" password="myPassword" />

This solved the problem, but I don't understand why I had to do this and I
don't want this to be the final solution.

Does anyone understand what is going on?

--
Thanks,

Bill Manring
Wavefront Software, Inc.
.



Relevant Pages

  • RE: Problem Writing a File from a Web Service
    ... "Bill Manring" wrote: ... it should have the same permissions as my Domain account. ... actually running under the ASPNET user credentials. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: HTTP/1.1 500 Internal Server Error
    ... Software engineer. ... In addition changed permissions to the ASPNET user but it did not seem ... (But not when the configured process accoount is the SYSTEM account... ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: HTTP/1.1 500 Internal Server Error
    ... Software engineer. ... In addition changed permissions to the ASPNET user but it did not seem to help. ... (But not when the configured process accoount is the SYSTEM account... ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: HTTP/1.1 500 Internal Server Error
    ... In addition changed permissions to the ASPNET user but it did not seem to help. ... (But not when the configured process accoount is the SYSTEM account... ... Software engineer. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Problem Writing a File from a Web Service
    ... it should have the same permissions as my Domain account. ... That leads me to believe that the web service isn't running under the ASPNET ... actually running under the ASPNET user credentials. ...
    (microsoft.public.dotnet.framework.aspnet)