web.config access problem

M

Microsoft

I'm trying to set up an application so that on first run/install it writes
to the web.config various values.

I have loaded the web.config into an xmldocument and have made the changes
but can't save the file back to disc i get an error similar to the
following:

Access to the path "C:\Source\myApp\web.config" is denied.

The web application is not in the inetpub folder.

How do i set the security/access etc so that the web.config file can be
written to.

The error page says:

"To grant ASP.NET write access to a file, right-click the file in Explorer,
choose "Properties" and select the Security tab. Click "Add" to add the
appropriate user or group. Highlight the ASP.NET account, and check the
boxes for the desired access."

I'm using windows xp pro and this option is not available where i can see
it.

I ideally would like to be able to do any settings at runtime in code but if
not possible any other suggested method would be appreciated.

barney nicholls
 
B

Barney Nicholls

Mary

I've created other folders and text files etc and i still can't get write
access to them.

I think i've iis5 up correctly but i must be a bit dim as i just can't get
it to let me write to a file.

any pointers on setting write access for asp.net to a file in a directory
with iis 5 and xp pro would be appreciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top