Create Virtual Directory from a Guidance Package. RRS feed

  • Question


    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" action would 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.

    Friday, May 16, 2008 10:02 AM


All replies

  • 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.

    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
    Wednesday, June 4, 2008 12:00 PM