Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Create Virtual Directory from a Guidance Package.
 

Create Virtual Directory from a Guidance Package.

I have a guidance package that creates a solution containing 1x Web Application, 1x Web Service and a couple of .dll projects.

In 1 of the .dll projects (Service Agent project) I need to create a Web Reference to the Web Service project. To do this, I want to register the Web Service project in IIS and not use the Development Server. I want all of this to happen while creating the initial solution.

I've gotten as far as determining that the "Create Virtual Directory" actionwould happen in an Action during the recipe execution.

What I need to know:

1. How do I create the application's virtual directory in IIS from an Action? (i.e. Click the "Create Virtual Directory" button under Project Properties)

2. Am I WAAAY off the mark here and making my own life more complicated?

I've searched the net quite a bit and found some code around opening the IIS metabase and creating the directory manually, but I'm not fond of that solution as I would want to make sure I leverage any (however trivial it might be) development, bug fix, etc that would be embedded in the function from the VS side.

Mike Nicol  Friday, May 16, 2008 10:02 AM
Hi,

You have to write your own code in the action to do that.The creation of a virtual directory in the IIS is not related with VS and even not GAX too, so you have to use the IIS api to achieve that.

here you have a couple of links which should be useful.
http://chiragrdarji.wordpress.com/2007/06/04/create-virtual-directory-in-iis-using-c/
http://forums.iis.net/default.aspx?GroupID=41

hth.
jose.
Jose Escrich  Friday, May 16, 2008 5:21 PM
Hi,

You have to write your own code in the action to do that.The creation of a virtual directory in the IIS is not related with VS and even not GAX too, so you have to use the IIS api to achieve that.

here you have a couple of links which should be useful.
http://chiragrdarji.wordpress.com/2007/06/04/create-virtual-directory-in-iis-using-c/
http://forums.iis.net/default.aspx?GroupID=41

hth.
jose.
Jose Escrich  Friday, May 16, 2008 5:21 PM
For a Web Application Project, the Web tab of the Project Properties permits you to select IIS to host the application, permits you to specify the virtual directory to contain the application, and has a button that will create the virtual directory for you. Is there any way to automate this feature?

Use File->New Project to create Web Service Projects
John Saunders  Wednesday, June 04, 2008 12:00 PM

You can use google to search for other answers

Custom Search

More Threads

• SFT Wix Installer error
• Problems installing SCSF source code may 2007
• February 07 GAX
• Microsoft.Practices.RecipeFramework.VisualStudio
• Simple class template reference
• System.Web.Extensions
• Adding drop down menu using editor
• Uninstalling Missing Packages
• Guidance Automation Manager not visible in Tools menu (VST2005)
• The following arguments are required and don't have values