Asked by:
New-WebSite error

Question
-
User-341820244 posted
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 test6Here'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
Friday, July 4, 2008 8:02 AM
All replies
-
User-1210653391 posted
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
Sunday, July 6, 2008 11:20 PM -
User-2024820165 posted
Monday, July 7, 2008 2:14 PM -
User-2024820165 posted
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'Monday, July 7, 2008 2:38 PM -
User-1210653391 posted
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
Monday, July 7, 2008 2:56 PM -
User-341820244 posted
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:\sitesPS > 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:\sitesName ID State Physical Path Bindings
---- -- ----- ------------- --------
Default Web Site 1 Started %SystemDrive%\inetpub\wwwroot http *:80:
test1 2 http *:80:test1Monday, July 7, 2008 4:28 PM -
User-36044203 posted
I'm getting this error too. Has this been fixed yet?
Tuesday, November 11, 2008 2:53 PM -
User-1062061548 posted
Check this out. I am not using PowerShell cmdlets's but the root cause of the issue is appPool is missing.
HTH,
VivekMonday, January 11, 2010 2:29 PM -
User-485500945 posted
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.
Tuesday, August 17, 2010 7:33 AM