New-WebSite errorRSS

8 replies

Last post Aug 17, 2010 07:33 AM by searsc

  • New-WebSite error

    Jul 04, 2008 08:02 AM|ShayL|LINK

    Hi

    Congratulations for the second CTP release!

    I get an error when trying to create a new site on Vista SP1:

    PS 8> New-WebSite -name test6

    Name  ID State Physical Path Bindings
    ----  -- ----- ------------- --------
    test6 6                      http *:80:test6
    New-WebSite : The object identifier does not represent a valid object. (Exception from HRESULT: 0x800710D8)
    At line:1 char:12
    + New-WebSite <<<<  -name test6

     

    Here's the full error information:

    Exception             : System.Runtime.InteropServices.COMException (0x800710D8): The object identifier does not repres
                            ent a valid object. (Exception from HRESULT: 0x800710D8)
                               at Microsoft.IIs.PowerShell.Framework.Interop.IAppHostProperty.get_Value()
                               at Microsoft.IIs.PowerShell.Framework.ConfigurationElement.GetPropertyValue(IAppHostProperty
                             property)
                               at Microsoft.IIs.PowerShell.Framework.ConfigurationAttribute.get_Value()
                               at Microsoft.IIs.PowerShell.Provider.RuntimeCommandBase.GetRuntimeProperty(String propName)
                               at Microsoft.IIs.PowerShell.Provider.GetItemStateCommand.ProcessRecord()
                               at System.Management.Automation.Cmdlet.DoProcessRecord()
                               at System.Management.Automation.CommandProcessor.ProcessRecord()
    TargetObject          :
    CategoryInfo          : NotSpecified: (:) [New-WebSite], COMException
    FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.NewWebSiteCommand
    ErrorDetails          :
    InvocationInfo        : System.Management.Automation.InvocationInfo
    PipelineIterationInfo : {0, 1, 1}

     

    I found that if you assign the command to a variable then the error is gone

    $newSite = New-WebSite -name test6


     

    -shay
  • Re: New-WebSite error

    Jul 06, 2008 11:20 PM|sergeia|LINK

    Shay, could you check status of your site using command "get-webitemstate path_to_site"? I think that Windows Activation Service (WAS) doesn't work on you machine. On output Powershell tries to get status of this object to fill column State, and seems that this fails. Or, you may try run command "dir iis:\sites". If you see no error and all sites show non-empty status field, it may be some problem with change notification, when site is created, it takes some time while WAS picks up status of this site.

    Please give me more details on this failure.

    --Sergei 

     

  • Re: New-WebSite error

    Jul 07, 2008 02:14 PM|rsiddaw|LINK

     

    I see the same error and I have the Activation Service running
  • Re: New-WebSite error

    Jul 07, 2008 02:38 PM|rsiddaw|LINK

    I also get the same error using new-appPool

    PS> New-AppPool -Name 'pool1'

    Name                     State        Applications
    ----                     -----        ------------
    pool1
    New-AppPool : The object identifier does not represent a valid object. (Exception from HRESULT: 0x800710D8)
    At line:1 char:12
    + New-AppPool <<<<  -Name 'pool1'

  • Re: New-WebSite error

    Jul 07, 2008 02:56 PM|sergeia|LINK

    This is the timing issue I mentioned in my earlier post. WAS needs more time to pick new site or pool and start it, therefore (depending on your system) you could see this error, it is produced by output routine. Both site and pool are succesfully created, but State field of their PS representation needs runtime object that wasn't created by WAS yet.

    I will fix this by next update of the provider.

    Thanks,

    Sergei

  • Re: New-WebSite error

    Jul 07, 2008 04:28 PM|ShayL|LINK

    Sergei,

    I run the following 5 commands in a row, notice that the second command has no output while the fifth shows that the site exists and running. Thanks for the update on the WAS issue.

    PS > New-WebSite test1

    Name             ID   State      Physical Path                  Bindings
    ----             --   -----      -------------                  --------
    test1            2                                              http *:80:test1
    New-WebSite : The object identifier does not represent a valid object. (Exception from HRESULT: 0x800710D8)
    At line:1 char:12
    + New-WebSite <<<<  test1


    PS > Get-WebItemState iis:\sites

    PS > Get-WebItemState test1
    Get-WebItemState : Cannot find path 'C:\test1' because it does not exist.
    At line:1 char:17
    + Get-WebItemState <<<<  test1


    PS > Get-WebSiteState test1
    Get-WebItemState : The object identifier does not represent a valid object. (Exception from HRESULT: 0x800710D8)
    At line:1 char:17
    + get-webitemstate <<<<  "IIS:\sites\test1"


    PS > dir iis:\sites

    Name             ID   State      Physical Path                  Bindings
    ----             --   -----      -------------                  --------
    Default Web Site 1    Started    %SystemDrive%\inetpub\wwwroot  http *:80:
    test1            2                                              http *:80:test1

     

    -shay
  • Re: New-WebSite error

    Nov 11, 2008 02:53 PM|spencer205|LINK

     I'm getting this error too.  Has this been fixed yet?

  • Re: New-WebSite error

    Jan 11, 2010 02:29 PM|vivekkum|LINK

    Check this out. I am not using PowerShell cmdlets's but the root cause of the issue is appPool is missing.

    http://www.dotnetscraps.com/dotnetscraps/post/The-object-identifier-does-not-represent-a-valid-object-(Exception-from-HRESULT-0x800710D8).aspx

    HTH,
    Vivek

  • Re: New-WebSite error

    Aug 17, 2010 07:33 AM|searsc|LINK

    Hi,

    I've just seen this on IIS7.5 with two web servers using shared configuration with three sites and three app pools running under one domain ID.

    All new sites were being left in an unknown state with the "The object identifier does not represent a valid object" (0x800710D8) error message.  The app pool was created and started up each time and the config looked ok in the applicationHost.config file.  The new site still did not work if I changed it to use the DefaultAppPool.  Restarting the site did not work, nor did the restart button under "Manage Server" in IIS Manager (which restarts the W3SVC service).

    What did work was restarting "Windows Process Activation Service" (WPAS) as did IISRESET (which includes a restart of WPAS).  After this the problem sites started working and further new sites created without error.  Interestingly I had to restart WPAS on the other web server using the shared config otherwise sites I created on the first without error continued to throw the 0x800710D8 error on the second. 

    HTH.

    Chris.