Virtual Directory in Web Setup Project

后端 未结 8 1998
梦谈多话
梦谈多话 2020-12-30 04:39

I have a web setup project which by default shows the virtual directory in the textbox installer screen. I wish that the virtual directory name cannot be edited by the user

8条回答
  •  生来不讨喜
    2020-12-30 04:58

    Sounds good in theory but near as I can tell, doesn't work, at least not for setting AppPool. I have a custom action to set the apppool (which by the way works fine when the installer is built with VS2005) in my vs2008 web setup project.

    DirectoryEntry IISVdir = new DirectoryEntry(String.Format("IIS://{0}{1}/{2}", strServer, strRootSubPath, Vdir));
    IISVdir.Properties["AppPoolId"].Value = appPool;
    IISVdir.CommitChanges();
    

    The installer runs with no dialog (removed the installation address UI node) but the AppPool set on the virtual directory ends up being DefaultAppPool.

    Other custom actions in my helper class do run and work.

    So there must be some other magic incantations needed.

    Thanks.

提交回复
热议问题