IIS Express Visual Studio Integration - Changing the Site Name

I am just starting to use Visual Studio 2010 SP1 with IIS Express. When Visual Studio starts IIS Express, it specifies the name of the "site" to start IIS Express. The name of the site is similar to the name of my web project. Is it possible for Visual Studio to launch a site with a different name? For example, if my web project name is "WebProject1", when Visual Studio starts IIS Express, it will use the following command:

iisexpress.exe /site:WebProject1 

I would like to get this to do this instead:

 iisexpress.exe /site:MyMasterSite 

Any ideas there?

+6
source share
1 answer

You will want to change this in the applicationhost.config file. This can be found in the user / documents / iisexpress / config folder. In the configuration file, under the system.applicationhost node section, you will find node sites that should allow you to set the name in the node site name.

  <sites> <site name="WebSite1" id="1" serverAutoStart="true"> <application path="/"> <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" /> </application> <bindings> <binding protocol="http" bindingInformation=":8080:localhost" /> </bindings> </site> <siteDefaults> <logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" /> <traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" /> </siteDefaults> <applicationDefaults applicationPool="Clr4IntegratedAppPool" /> <virtualDirectoryDefaults allowSubDirConfig="true" /> </sites> 
+8
source

Source: https://habr.com/ru/post/886170/


All Articles