« Previous Next »

Thread: web.config locked

Last post 10-23-2009 9:18 AM by anilr. 8 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (9 items)

Sort Posts:

  • 11-14-2008, 5:32 AM

    • waxie
    • Top 500 Contributor
    • Joined on 07-04-2007, 2:29 PM
    • Posts 20

    web.config locked

    We sometimes have customers with this error:

    HTTP Error 500.19 - Internal Server Error
    The requested page cannot be accessed because the related configuration data for the page is invalid.
    Module IIS Web Core
    Notification BeginRequest
    Handler Not yet determined
    Error Code 0x80070005
    Config Error Cannot read configuration file due to insufficient permissions

    Also using ftp they can't delete/overwrite their web.config

     

    This happens with new sites when ppl test it. If you wait some hours then all is fine, also reboot of the storageservers solves the problem.

  • 11-14-2008, 12:36 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: web.config locked

    This is not locked - it is just plain access denied - what are the ACLs on the site's root directory when you create it and what are the ACLs when it starts working?

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 11-17-2008, 3:59 AM In reply to

    • waxie
    • Top 500 Contributor
    • Joined on 07-04-2007, 2:29 PM
    • Posts 20

    Re: web.config locked

    ACL's don't change.

    The fe servers have full control as has the ftp user.

    When we have this error and you try to create a web.config using 1 of the fe servers i get this error message:

    File in use

    The action can't be completed because the file is open in an other program

     

    I'm logged on to the server using a domainadmin account.

    If i try to create the file on the storage server i don't get this error.

    An other thing is that there is no web.config in the rootfolder of this site?!?

  • 11-17-2008, 1:06 PM In reply to

    Re: web.config locked

    Do you have any type of anti-virus on the server that has it locked?

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 11-18-2008, 2:55 AM In reply to

    • waxie
    • Top 500 Contributor
    • Joined on 07-04-2007, 2:29 PM
    • Posts 20

    Re: web.config locked

    No.

    Just some iis fe servers with a shared storage server. No other functions running on the servers and ftp is FTP7

  • 11-18-2008, 4:37 AM In reply to

    • waxie
    • Top 500 Contributor
    • Joined on 07-04-2007, 2:29 PM
    • Posts 20

    Re: web.config locked

    Doesn't seem it only has to do with web.config

    Just got an other complained.

    A user is using ftp or visualstudio to create and delete folders, when he deletes the folder and creates a folder with the same name again he gets an access denied.

    Is there some caching on front end servers in iis7?

  • 11-18-2008, 6:41 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: web.config locked

    This means that some process has open handle to that file/directory which is preventing it from getting deleted/re-created - IIS does not keep any file handles open long-term - you can use process explorer from sysinternals to figure out who has the handle open.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 10-23-2009, 5:42 AM In reply to

    • sziegu
    • Not Ranked
    • Joined on 10-23-2009, 9:34 AM
    • Posts 1

    IIS puts locks on folders.

    These things you talked about seem a little similar to our problem here.

    When we build our application we first delete the correspondent folder in IIS7 wwwroot and than recreate it. If we use the application before building it again (everyone does this), we get an access denied error on the folder deleted when recreating it.

    So, I did the following thing. Instead of building I manually deleted the folder in wwwroot and refreshed the windows explorer page. The folder reappeared. I than fired up process explorer and searched for a handle with the folders name. So I found out that IIS7 (w3wp process) is keeping a handle opened for that folder.

    Restarting IIS fixes the problem.

    My question is how can I fix the problem without restarting IIS each time I build the application ?

  • 10-23-2009, 9:18 AM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: IIS puts locks on folders.

    IIS needs to register for change-notification for every virtual directory requested so it can update stuff cached in memory when things change - this means keeping a handle open to the root of the virtual directory (the root of an application is also a virtual directory).  If you really want to delete the root folder of the application, you can first remove the application from IIS configuration, you should then be able to remove it.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
Page 1 of 1 (9 items)
Microsoft Communities