Re: Can't Write File on Hosted Server...

From: John Timney \(Microsoft MVP\) (timneyj_at_despammed.com)
Date: 10/30/04


Date: Sat, 30 Oct 2004 21:36:54 +0100

Authentication for write permissions can be a tricky thing in a hosted
environment, if you have been given write permissions at all.

I would guess that the hosting provider denies write at some point in the
path
 "c:\xxx\xxx\xxx\csgallagher\xxx\SomeFile.xml" is denied.
at a level below your application.for the asp.net account, so even
impersonation is unlikely to help as you have found.

Your next step is probably to drop them an email outling the problem, even
passing them a small code sample. If they are any good as a hosting
provider they will be able to tell you straight away what the problem is and
resolve it for you.

--
Regards
John Timney
Microsoft Regional Director
Microsoft MVP
"clintonG" <csgallagher@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:uK7p5cpvEHA.592@TK2MSFTNGP15.phx.gbl...
> The application is a simple form of three textbox controls that results
> in writing an XML file to the file system of the application root when
> it runs on the local development machine.
>
> I've just used FTP to deploy this as my first ASP.NET application using
> a hosting provider using W2003 IIS6 noting the host provides a control
> panel that allows me to set the application root as a virtual application.
>
> The XML file is not being created and the application bombs out.
> I have no idea how to respond to the error message that follows...
>
> <errorStart>
> Exception Details: System.UnauthorizedAccessException: Access to the path
> "c:\xxx\xxx\xxx\csgallagher\xxx\SomeFile.xml" is denied.
>
> ASP.NET is not authorized to access the requested resource. Consider
> granting access rights to the resource to the ASP.NET request identity.
> ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5
or
> Network Service on IIS 6) that is used if the application is not
> impersonating. If the application is impersonating via <identity
> impersonate="true"/>, the identity will be the anonymous user (typically
> IUSR_MACHINENAME) or the authenticated request user.
> </errorEnd>
>
> Using the hosting control panel I tried giving ASPNET full permission on
> the application's folder. No joy.  I tried adding <identity
> impersonate="true"/>
> to the web.config but learned it results in a challenge for credentials. I
> used
> my account credentials which were refused confusing me even further as
> the error message indicates using impersonation as noted used the identity
> of
> the anonymous IUSR_MACHINENAME user account.
>
> I have no idea what to try next.
>
>
> --
> <%= Clinton Gallagher, "Twice the Results  -- Half the Cost"
>          Architectural & e-Business Consulting -- Software Development
>          NET csgallagher@REMOVETHISTEXTmetromilwaukee.com
>          URL http://www.metromilwaukee.com/clintongallagher/
>
>


Relevant Pages

  • Re: setting web site permissions
    ... permissions need to be granted to whatever process ASP.NET is using (e.g. ... you are telling ASP.NET to use Windows Authentication (which means user ... In web.config choose either to enable impersonation (in which case you ... I'm going nuts trying to set the permissions on an ASP.Net web site. ...
    (microsoft.public.inetserver.iis.security)
  • Re: Problems with Password Protected Access DB
    ... it is a permissions issue. ... > If you are using impersonation with authentication then you need to ... > authentication then sufficient permissions must be provided to the ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: VS.NET 2005 and the "allowDefinition=MachineToApplication" error
    ... Your description of impersonation is great. ... If you want to use the default configured account, eliminate that entry, or configure it as: ... The easiest way to assign correct permissions to all required directories is to run: ... I re-started IIS and tried to access my ASPX page again -- same ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: default for requiring authentication 2003
    ... Windows 2000 and earlier would allow access as I described and I ... default for requiring authentication 2003 ... resources that have permissions for Everyone unless you enable this setting. ... same username and password as a user on the domain or on the local server. ...
    (Focus-Microsoft)
  • Re: Authentication from Active Directory and Database based user d
    ... with this (I'm not too clear on the permissions to see a page or actual ... You mentioned earlier in the thread that you've used formas authentication ... you don't need separate ... I'm writing a web system ...
    (microsoft.public.dotnet.framework.aspnet.security)

Loading