web.config access problem

Discussion in 'ASP .Net Security' started by Microsoft, Sep 3, 2003.

  1. Microsoft

    Microsoft Guest

    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
     
    Microsoft, Sep 3, 2003
    #1
    1. Advertising

  2. 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

    "Mary Chipman" <> wrote in message
    news:...
    > Web.config is designed so that it can't be browsed to or written to at
    > runtime. You'll need to modify it outside of ASP.NET.
    >
    > -- Mary
    > MCW Technologies
    > http://www.mcwtech.com
    >
    > On Wed, 3 Sep 2003 14:12:36 +0100, "Microsoft"
    > <> wrote:
    >
    > >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
    > >
    > >

    >
     
    Barney Nicholls, Sep 4, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGFuaWVs?=

    Machine.config & web.config

    =?Utf-8?B?RGFuaWVs?=, Jan 18, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    13,333
    Hermit Dave
    Jan 18, 2004
  2. =?Utf-8?B?QXVndXN0aW4gUHJhc2FubmEuIEo=?=

    Web.Config Get Config settings at runtime.

    =?Utf-8?B?QXVndXN0aW4gUHJhc2FubmEuIEo=?=, Feb 5, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,268
    Kevin Spencer
    Feb 6, 2004
  3. KQ
    Replies:
    1
    Views:
    453
  4. Benny Ng
    Replies:
    9
    Views:
    9,981
    Benny Ng
    Oct 13, 2005
  5. CSharpner
    Replies:
    0
    Views:
    1,047
    CSharpner
    Apr 9, 2007
Loading...

Share This Page