I have a web application that I deploy to an IIS Website with Octopus v 2.3.6.1385 which is working fine. Now my application needs to have an additional virtual directory in the IIS Website, is this possible to do with Octopus or do I need to have custom PowerShell scripts?
How can i declare the virtual path and physical path to create IIS Application creation.
i have attach a screen shot.May i known what wrong in this and need to know how to declare virtual path and physical path
As per the description on the Library site for the Step Template, the Virtual Path should be in the format myapp or, to create it under a parent /applications/myapp.
Virtual path
#{VirtualPath}
The name of the application to create. For example, to serve an application that will be available at /myapp, enter myapp. To create an application under a parent virtual directory or application, separate with slashes - for example: /applications/myapp
For the Physical Path you can use #{Octopus.Action[ActionName].Output.Package.InstallationDirectoryPath} which will evaluate to the folder where the NuGet package has been extracted to.
Thanks for your reply.But when i use your method i will get as following error :
How can i fix it
Virtual path: hslogin
Physical path:
#{Octopus.Action[hslogin].Output.Package.InstallationDirectoryPath}
Parent site: Default Web Site
Getting web site Default Web Site
Creating virtual directory 'hslogin’
Attempt 1 of 5 failed: Parameter ‘PhysicalPath’ should point to existing path.
Waiting for 2 seconds before retrying…
Info 11:44:40
Retrying…
Creating virtual directory 'hslogin’
Attempt 2 of 5 failed: Parameter ‘PhysicalPath’ should point to existing path.
Waiting for 2 seconds before retrying…
Info 11:44:42
Retrying…
Creating virtual directory 'hslogin’
Attempt 3 of 5 failed: Parameter ‘PhysicalPath’ should point to existing path.
Waiting for 2 seconds before retrying…
Info 11:44:44
Retrying…
Creating virtual directory 'hslogin’
Attempt 4 of 5 failed: Parameter ‘PhysicalPath’ should point to existing path.
Waiting for 2 seconds before retrying…
Error 11:44:44
Failed to execute command
Error 11:44:44
At C:\Windows\system32\config\systemprofile\AppData\Local\Tentacle\Temp\dc4f9a0
Error 11:44:44
1-2890-4319-a12f-a752c9af2580.ps1:53 char:13
Error 11:44:44
throw <<<< "Failed to execute command"
Error 11:44:44
+ CategoryInfo : OperationStopped: (Failed to execute command:Str
Error 11:44:44
ing) [], RuntimeException
Error 11:44:44
+ FullyQualifiedErrorId : Failed to execute command
Info 11:44:44
Retrying…
Creating virtual directory 'hslogin’
Info 11:44:44
PowerShell exit code: 1
Fatal 11:44:44
PowerShell script returned a non-zero exit code: 1
Tentacle version 2.6.0.778
Info 11:46:12
Tentacle script execution
Any news about this problem? We are experiencing it with offline deployments. To me it seems that the Physical Path variable is not evaluated at all when using #{Octopus.Action[ActionName].Output.Package.InstallationDirectoryPath}
Same here! Would be nice if someone could explain how the #{Octopus.Action[ActionName].Output.Package.InstallationDirectoryPath} is supposed to be used…
Jag ?r ledig och ?r tillbaka igen m?ndagen den 31:e augusti. L?mna ett meddelande p? mitt mobilsvar om det ?r n?got br?dskande s? ringer jag tillbaka vid tillf?lle.
Ok, I figured it out; The clue is in the ‘ActionName’ of the variable. You need to provide a previous step name for the ‘ActionName’, typically the name of the step that deploys the package to your server.
E.g. if the step for deploying the nuget package is called ‘Deploy NuGet Package’, then the correct variable will be:
Yes, if the step for creating a vdir on IIS was the same step as the
deployment step, that would work. But you can’t (as far as I know) use that
to reference an earlier step in the process.