I have the following situation:
RootWebsite
Virtual Application
Virtual directory
So I created a step based on the template IIS Virtual Directory - Create and IIS Virtual Directory - Create under child site, but both results in the same:
- The first release succeeds and the virtual directory is created
- The next release fails, with this output:
Creating virtual directory 'media’
November 28th 2016 13:03:36Info
Attempt 1 of 5 failed: Destination element already exists, please use “force” parameter to override.
November 28th 2016 13:03:36Info
Waiting for 3 seconds before retrying…
November 28th 2016 13:03:39Info
Retrying…
So If I remove the virtual directory it succeeds, so I could fix this myself, but I think there is something wrong with the template …
Hi Maarten,
Thanks for getting in touch! I imported the latest version of 'IIS Virtual Directory - Create’ template from the library and used it to re-create your scenario. Unfortuantelly I was not able to reproduce your problem. This is what I did:
- I created a project with single step that creates a virtual directory under
Default Web Site
. Have a alook at the attachement for more details.
- I executed 3 deployments and all of them suceeded.
That being said I managed to break my deployment when I converted the virtual directory to a web application manually. Is that something you’ve also done? If so, then possibly you want to create a web application under an existing web site. If that’s the case then I encourge you to have a look at our new Deploy an IIS Website step. It might be just what you are looking for.
Please let me know how you go.
Regards,
Pawel
Included the content of the step
Hi Pawel,
Thanks for your response. The steps that I took:
-
Create a website, using the Deploy package step + configure IIS website
-
Create a web application (underneath the website from step 1) using the deploy package step + configure IIS web application
-
Create a virtual directory using the Create Virtual directory template step
-
Deploy 2 times to the same server
So I created 3 levels of nesting : Website > Web application > Virtual directory. The example you have been trying has 2 levels of nesting and is working fine at my place as well. (We had than running before this setup).
For step 3 I used both the Create Virtual Directory template as the Create under Child website template. Both had the same error.
In order to solve the issue, I created a custom powershelll script and remove the virtual directory each deployment.
If you need any additional information, please let me know.
Best regards,
Maarten
Hi Maarten,
Thanks for your clarification. You are right, I missed one of the steps. I created a project that consists of 3 steps and I was able to reproduce your problem. To fix it I changed the Create Virtual Directory
step from using community template to using our new builtin Deploy an IIS Website step with Deployment Type
set to IIS Virtual Directory
. Can you try that and see whether this solves your problem?
Regards,
Pawel
HI Pawel,
Thanks for taking the time to help me out there, much appreciated! I have been trying to suggestion, however I run into problems with that:
-
I don’t have a package for this virtual directory, since it’s just points to a content folder on that server. The form allows me to skip this package field, but when I deploy, it fails because it wasn’t able to load a package for this step.
-
It asks for a relative path of the package, while I rather specify an absolute path (since it has nothing to do with my package)
Do you have any other suggestions?
Best regards,
Maarten
Hi Maarten,
Sorry for the late replay. Yes, you are correct in saying that you need a package and I see how in your particual case it doesn’t make sense to provide one. The only workaround I can think of is to deploy an empty package (e.g. empty zip file). Also the path can be absolute. Please have a look at the screenshot for more details.
Please let me know how you go.
Pawel
Hi Pawel,
No problem, I’m not in a hurry. Well than I stick with my own workaround: Just a simple powershell script which removes the virtual directory, if it was already created by previous deployment.
However is there going to be a permanent fix for this, since I already have workaround?
Best regards,
Maarten
Hi,
Thanks for your feedback. At the moment we are not planning to remove the need of having a package but if you believe it is an important feature then please add a new idea to our UserVoice site.
Regards,
Pawel
Hi Pawel,
Well I was more wondering why the other (the virtual directory template which I started with), does support it. Is this a community template or maintained by you guys?
Best regards,
Maarten
Hi,
Sorry, I thought you were talking about the builtin step. Yes it is a community template and we only maintain the site that hosts them. If you believe it is a bug it would be great if you could submit a PR.
Regards,
Pawel