Web Service Deploy

I want to deploy a web service on the IIS server, and I want to deploy it inside the Default Web Site. I’ve tried it with different way and with templates (like : IIS Application - Create, IIS AppPool - Create) but some time it creates the website outside the Default Web Site or some time it show the error that “Failed to ensure parent”, also there was many more errors.

But I’ve tried a lot but not get the exact solution. Would you guys please help me to resolve my issue or provide a best article link from where I can understand this process and achieve what I want.

Below are some images of the folder structure and IIS manual service deployment, for better understanding. I want same with the octopus. (IIS Image - what actually we want - here NewTest is the appPool name)

Thanks in Advance.
Rishabh Jain


Hello All,

Anyone get a chance to look into the requested Problem?

Hi Rishabh,

Thanks for getting in touch! I am a little confused why you would be getting such different results! Are you able to provide a screenshot of your project process page and also a full deployment log.
Please be sure to make a new release before you do the deployment log to make sure I have the latest process and variables.



Thanks Vanessa for your response.

Hello All,

I’m getting the attached error while creating the virtual path at multiple level hierarchy. I’m performing three step to deploy the web service.
Step 1- Create the custom directory. (using inbuilt template and follow Custom installation directory step)
Step 2 - Create the application pool (using template : IIS AppPool - Create) Attached are the steps I’ve created for service deployment.
Step 3 - IIS Application - Create

In step3 when I’m using virtual directory of one level then application created successfully. But once I’m using the virtual directory of multiple level then it throw an error. See attached error log. Also here I’m attaching some screenshot of step 3. (Variables.png is defining the vvariable I’m using and Step3 is defining the IIS path steps.)

I’m using below:-
CustomInstallationDirectory - “C:\inetpub\wwwroot\Services\XYZ\MainServiceFolder”
VirtualPath - Services/XYZ/MainServiceFolder/
Physical Path - “C:\inetpub\wwwroot\Services\XYZ\MainServiceFolder”
Parent Site - “Default Web Site”
The expected result I want are display in the previously attached image “IISImage”.

I more thing I wanna told you guys that if I’ll stop to throw the below exception by changing in the “IIS Application - Create” template then the code successfully ruin and I received expected result
Stop to throw below error by updating the template.
else {
throw “Failed to ensure parent”

It would be appreciable if I got the quick response. Thanks in advance.


ServerTasks-532.log.txt (10 KB)

Hello All,

Any update on the above request. Could someone please help to resolve the issue.

Rishabh Jain

Hi Rishabh,

Can you add the following variables and create a new release and then send me the deployment log?

Hopefully it should show your defined variables.

Hi Vanessa,

Please find the attached logs. It might be the same as you want, and hopefully will helpful to you to resolve my problem.


ServerTasks-712.log.txt (312 KB)

Hello Vanessa,

Have you got a chance to look into the attached log? Or this not what you expect? Please provide me the solution or let us know if I’m doing something wrong? Your early response would be appreciable and helpful to me, so that I can processed further.

Rishabh Jain

Hi Rishabh,

Very sorry for the delay here.

It seems like you are almost there, but something funny is going on with that step template. Could you please do the following?

  1. Export the step template IIS AppPool - Create and attach it to this ticket as a separate text file. To export it you have to go to Library-> Step Templates -> [Your step template] -> Export -> Send the whole JSON

  2. Once you exported the step in (1), try importing the step template I’ve attached to this ticket instead. That one is working as expected on my end.

Best regards,

IISAppCreateForRishabh.txt (12 KB)