« Previous Next »

Thread: New-WebApplication leaves open handles

Last post 01-14-2009 6:26 PM by sergeia. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 12-11-2008, 3:53 PM

    • VaderPi
    • Not Ranked
    • Joined on 12-11-2008, 8:38 PM
    • Posts 2

    New-WebApplication leaves open handles

    Handles to the web application's physical directory and the parent site's physical directory are left open after running the New-WebApplication command. This results in not being able to manipulate the directories due to access is denied errors. Below is a transaction of commands that illustrates the issue. Handle is being used to detect that the handles are left open.
    PS C:\Source\api\Tools\Deployment> c:\handle api
    
    Handle v3.42
    Copyright (C) 1997-2008 Mark Russinovich
    Sysinternals - www.sysinternals.com
    
    System             pid: 4       3C8: C:\Windows\System32\setupapi.dll
    System             pid: 4       480: C:\Windows\System32\advapi32.dll
    System             pid: 4       4B0: C:\Windows\System32\dnsapi.dll
    java.exe           pid: 1608    374: C:\Program Files\apache-activemq-5.1.0\lib\web\jsp-api-2.1-6.1.9.jar
    java.exe           pid: 1608    384: C:\Program Files\apache-activemq-5.1.0\lib\web\slf4j-api-1.5.0.jar
    java.exe           pid: 1608    3D4: C:\Program Files\apache-activemq-5.1.0\lib\jaxb-api-2.0.jar
    java.exe           pid: 1608    3E0: C:\Program Files\apache-activemq-5.1.0\lib\stax-api-1.0.jar
    java.exe           pid: 1608    564: C:\Program Files\Java\jre6\lib\ext\sunmscapi.jar
    handle.exe         pid: 6856      8: C:\Source\api\Tools\Deployment
    PS C:\Source\api\Tools\Deployment> New-WebSite "Api" -HostHeader "*" -PhysicalPath "D:\www\api"
    
    Name             ID   State      Physical Path                  Bindings
    ----             --   -----      -------------                  --------
    Api              3               D:\www\api                     http *:80:*
    New-WebSite : The object identifier does not represent a valid object. (Exception from HRESULT: 0x800710D8)
    At line:1 char:12
    + New-WebSite  <<< c:\handle api
    
    Handle v3.42
    Copyright (C) 1997-2008 Mark Russinovich
    Sysinternals - www.sysinternals.com
    
    System             pid: 4       3C8: C:\Windows\System32\setupapi.dll
    System             pid: 4       480: C:\Windows\System32\advapi32.dll
    System             pid: 4       4B0: C:\Windows\System32\dnsapi.dll
    java.exe           pid: 1608    374: C:\Program Files\apache-activemq-5.1.0\lib\web\jsp-api-2.1-6.1.9.jar
    java.exe           pid: 1608    384: C:\Program Files\apache-activemq-5.1.0\lib\web\slf4j-api-1.5.0.jar
    java.exe           pid: 1608    3D4: C:\Program Files\apache-activemq-5.1.0\lib\jaxb-api-2.0.jar
    java.exe           pid: 1608    3E0: C:\Program Files\apache-activemq-5.1.0\lib\stax-api-1.0.jar
    java.exe           pid: 1608    564: C:\Program Files\Java\jre6\lib\ext\sunmscapi.jar
    handle.exe         pid: 7132      8: C:\Source\api\Tools\Deployment
    PS C:\Source\api\Tools\Deployment> New-WebApplication -Site "Api" -Name "v0" -PhysicalPath "D:\www\api\v0"
    
    Name                          ApplicationPool               EnabledProtocols              PhysicalPath
    ----                          ---------------               ----------------              ------------
    v0                            DefaultAppPool                http                          D:\www\api\v0
    
    
    PS C:\Source\api\Tools\Deployment> c:\handle api
    
    Handle v3.42
    Copyright (C) 1997-2008 Mark Russinovich
    Sysinternals - www.sysinternals.com
    
    System             pid: 4       3C8: C:\Windows\System32\setupapi.dll
    System             pid: 4       480: C:\Windows\System32\advapi32.dll
    System             pid: 4       4B0: C:\Windows\System32\dnsapi.dll
    java.exe           pid: 1608    374: C:\Program Files\apache-activemq-5.1.0\lib\web\jsp-api-2.1-6.1.9.jar
    java.exe           pid: 1608    384: C:\Program Files\apache-activemq-5.1.0\lib\web\slf4j-api-1.5.0.jar
    java.exe           pid: 1608    3D4: C:\Program Files\apache-activemq-5.1.0\lib\jaxb-api-2.0.jar
    java.exe           pid: 1608    3E0: C:\Program Files\apache-activemq-5.1.0\lib\stax-api-1.0.jar
    java.exe           pid: 1608    564: C:\Program Files\Java\jre6\lib\ext\sunmscapi.jar
    powershell.exe     pid: 492     55C: D:\www\api
    powershell.exe     pid: 492     7EC: D:\www\api
    powershell.exe     pid: 492     8DC: D:\www\api\v0
    handle.exe         pid: 5284      8: C:\Source\api\Tools\Deployment
    PS C:\Source\api\Tools\Deployment>
    
  • 12-11-2008, 4:58 PM In reply to

    • VaderPi
    • Not Ranked
    • Joined on 12-11-2008, 8:38 PM
    • Posts 2

    Re: New-WebApplication leaves open handles

    This issue is also caused by running the new-item command with a type of application.
    New-Item "IIS:\Sites\Api\v0" -physicalPath "D:\www\api\v0" -type Application
    
  • 01-14-2009, 6:26 PM In reply to

    • sergeia
    • Top 100 Contributor
    • Joined on 04-14-2008, 4:47 PM
    • Posts 68

    Re: New-WebApplication leaves open handles

    Thanks, I see it. I will open a bug and it will be fixed in final release.

    --Sergei 

     

Page 1 of 1 (3 items)
Microsoft Communities