IIS web site PostScript.PS1 errors -agent rights OK?

Automated deployment for web applications and databases

Moderators: Mike Upton, justin.caldicott, Sean.newham, csmith, chirayu, DavidSimner, david.conlin

IIS web site PostScript.PS1 errors -agent rights OK?

Postby zorrow » Wed Sep 18, 2013 9:08 pm

Hello there!

I'm running the following PostScript.PS1 script after deploying my site in IIS:

Code: Select all
Import-Module WebAdministration

$appPath = "Default Web Site\\MyWebsite"
$appPoolName = "MyWebsite"
$userAccountName = "MY_DOMAIN\\MY_ACCOUNT"
$userAccountPassword = "mypassword"

Set-ItemProperty -Path IIS:\\AppPools\\$appPoolName -Name processmodel.identityType -Value 3
Set-ItemProperty -Path IIS:\\AppPools\\$appPoolName -Name processmodel.username -Value $userAccountName
Set-ItemProperty -Path IIS:\\AppPools\\$appPoolName -Name processmodel.password -Value $userAccountPassword

Set-WebConfigurationProperty -filter /system.WebServer/security/authentication/AnonymousAuthentication -name enabled -value false -PSPath IIS:\\Sites\\$appPath
Set-WebConfigurationProperty -filter /system.WebServer/security/authentication/windowsAuthentication -name enabled -value true -PSPath IIS:\\Sites\\$appPath


When I run this in the Powershell console with administrator rights on my Windows 2008 R2 server, it works perfectly.

However, when I run it with the deployment manager, I'm getting the following errors for every call to Set-ItemProperty and to Set-WebConfigurationProperty:

Code: Select all
ERROR: Set-ItemProperty : Cannot retrieve the dynamic parameters for the cmdlet. Retrieving the COM class factory for component with CLSID {688EEEE5-6A7E-422F-B2E1-6AF00DC944A6} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
ERROR: At D:\\WebApps\\CDPQ.ESB\\CDP.ESB.Services\\PostDeploy.ps1:9 char:17
ERROR: + Set-ItemProperty <<<<  -Path IIS:\\AppPools\\$appPoolName -Name processmodel.identityType -Value 3
ERROR:     + CategoryInfo          : InvalidArgument: (:) [Set-ItemProperty], ParameterBindingException
ERROR:     + FullyQualifiedErrorId : GetDynamicParametersException,Microsoft.PowerShell.Commands.SetItemPropertyCommand

Code: Select all
ERROR: Set-WebConfigurationProperty : Retrieving the COM class factory for component with CLSID {688EEEE5-6A7E-422F-B2E1-6AF00DC944A6} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
ERROR: At D:\\WebApps\\CDPQ.ESB\\CDP.ESB.Services\\PostDeploy.ps1:14 char:29
ERROR: + Set-WebConfigurationProperty <<<<  -filter /system.WebServer/security/authentication/windowsAuthentication -name enabled -value true -PSPath IIS:\\Sites\\$appPath
ERROR:     + CategoryInfo          : NotSpecified: (:) [Set-WebConfigurationProperty], COMException
ERROR:     + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.SetConfigurationPropertyCommand


What's happening here? What can I do about this? Can you please help me?

Thanks in advance!
zorrow
 
Posts: 2
Joined: Wed Sep 18, 2013 8:55 pm
Location: Canada

Postby james.billings » Thu Sep 19, 2013 9:02 am

I've contacted you directly about this- but for the benefit of others, please try updating to the latest build (2.2.12 or newer) and seeing how this affects things.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby zorrow » Thu Sep 19, 2013 10:34 am

Did you guys make a release yesterday to publish this fix for everybody? That’s just plainly awesome!

The update did resolve the problem. I just:

1- Downloaded the new Delivery Manager installer and re-installed it on the server.
2- Downloaded the new agent installer and re-installed it on every target machine.
3- In my Delivery Manager portal, opened the Environments tab. Every target machine's agent was still showing a "Needs update" message. Just clicked on "Edit" on every agent, saved and then the agent re-checked its status and became "Online".
4- Now, I created a new release for my project and successfully deployed it on every environment.

Everything works now.

Thank you!

PS: By the way, I'll be initiating the purchase of an enterprise licence of this product today. Mine's is a big organization and it will take a couple of days (or maybe even a couple of weeks) to complete all the process, but this is gonna happen for sure. Thanks again!
zorrow
 
Posts: 2
Joined: Wed Sep 18, 2013 8:55 pm
Location: Canada

Postby james.billings » Thu Sep 19, 2013 10:39 am

I think there had been one or two issues where the different versions of powershell were related, so that was the main change yesterday- we're aiming to put out a release every Wednesday at the moment. Glad that worked, do contact us again if you need anything further (you can always raise a ticket at redgatesupport.zendesk.com or email support@red-gate.com)
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to Deployment Manager

Who is online

Users browsing this forum: No registered users and 1 guest