473,378 Members | 1,360 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.

Can't Write File on Hosted Server...

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 cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
Jul 21 '05 #1
2 2245
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" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:uK*************@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 cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

Jul 21 '05 #2
Thank you John. The host provider has been very responsive and just notified
me to explain they had to apply permissions for the Network Service account
byut didn't explain if that was applied to the root of the account to enable
permissions to propagate or if the permissions were applied to the
application root of the virtual application so one more round opf tech
support %-)

Got to read more about Code Access Security and just found this...

MSDN - Hosting Multiple ASP.NET Applications
http://msdn.microsoft.com/library/de...l/secmod93.asp

<%= Clinton Gallagher


"John Timney (Microsoft MVP)" <ti*****@despammed.com> wrote in message
news:Od**************@TK2MSFTNGP12.phx.gbl...
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" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:uK*************@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 cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/


Jul 21 '05 #3

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

Similar topics

6
by: Pat Carden | last post by:
Hi, We need to allow webusers to upload a file on our website (on Server3, all servers run Server 2003, remotely hosted) and eventually save it on our SBS Server (Server2) which is not exposed...
5
by: George | last post by:
Hi, Is it possible to specify the location of a web.config file in an ASP.NET application? I have one ASP.NET application which is to be hosted on 2 web sites in the same web server. I want...
2
by: Urs Eichmann | last post by:
We're developing a standard software application (ASP.NET) which will run on servers of various ISP in a shared/hosted environment. With the ISP I usually work with it is no problem to get a folder...
2
by: Julia | last post by:
Hi, Can a Remote object be a WebService as well? i want to able to connect to a remote object either using .NET remoting and HTTP\SOAP so I wonder if I can create a singleton(statefull)...
2
by: clintonG | last post by:
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...
0
by: Matt Schwartz | last post by:
I have a ASP.NET web application written using VB.NET. I have a data grid, that is sent to the browser as an excel document using the following code Private Sub CreateXLS(ByVal xdatagrid As...
0
by: Josiah Smith | last post by:
Hi, I'm using MS Office Infopath in a hosted application, but for simplicity's sake, I'll use Word as an example in describing my problem. I have a hosted webbrowser control that links to a...
4
by: Billy | last post by:
Hi all, I'm building a text file from a database table using the ASP Write Method and would like to position the cursor in a specific column position before writing the fields. As I loop through...
3
by: tuvman | last post by:
We are developing a web application. Our web app is a heavy client- our existing .net app exposed as an activex control running in IE. We need the activex to be able to access our remote database...
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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.