Updating the physicalpath on an existing IIS application for IIS Application - Create step template fails

I’m using IIS Application - Create Step Template to create or update a virtual application. I’m using this step template on plenty of other steps without issue when doing a simple update of the IIS Application without deploying a new version of the application. It’s just this one step that seems to fail when updating the Physical Path.

I get the following:

Virtual path: MyApp
Physical path: E:\Program Files\apps\Test\MyApp\1.0.5637.17171
Application pool: MyApp
Parent site: Test.com
Getting web site Test.com
The web application ‘MyApp’ already exists. Updating physical path:
Attempt 1 of 5 failed: Value cannot be null.
Parameter name: path

Any thoughts on what could be causing the issue for this one IIS Virtual Application?

Hi,

Thanks for reaching out. Could you please enable the debugging variables on your project, then create new release, deploy it and send us the raw deployment log?

http://docs.octopusdeploy.com/display/OD/Debug+problems+with+Octopus+variables
http://docs.octopusdeploy.com/display/OD/Get+the+raw+output+from+a+task

Try to run as fewer steps as possible to avoid the extra noise on the log.

Thanks,

Dalmiro

I’ve attached my log file and just ran the step that was failing.

It’s now just failing on every deploy now. What’s strange is when we drop this virtual application out of IIS and do a deploy it will succeed. Every deploy after that will fail with the same error message above.

I’ve attached a sanitized sample of the raw output of the failure.

I’ve just pulled out all of the Project Variables that were for my application. I’ve also included the sample of the powershell script at the top that ran but failed.

I have 2 other applications that are using the same step template that are able to update the virtual application when it runs.

Octopus_Deploy_Raw_Output.txt (11 KB)

We did a get-ItemProperty with the path generated for the name portion below like this:
Get-ItemProperty -path IIS:\Sites\Test.com\MyApp | Select *

That’s when we noticed the FullName path coming back had a completely different path. We then realized there was another iis application declared on our server with the same name which was throwing this off. Once we updated the mapping we have been able to update this with the step template.