How to use subdomains with localhost on IISExpress?
NiceOne...
1390
Points
18
Posts
|
This can be done by editing the applicationHost.config file and this is located at C:\Users\yourProfile\Documents\IISExpress\config\applicationHost.config
Or you can follow following steps to find applicationHost.config file: I) Run VS in debug mode (in as administrator) II) Now you can see notification area iisexpress icon as III) Right click on this icon- click on show all applications IV) Now you can see the links V) Click on config link Visual Studio usually handles editing this file for you when you make configuration changes, but you can manually edit. Check following section in file <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>
Find the particular site you are working with and the following bindings should work: <bindings>
<binding protocol="http" bindingInformation="*:12454:localhost" />
<binding protocol="http" bindingInformation="*:12454:contoso.localhost" />
</bindings>
You can really change the port to anything you want so you could use 80 to save yourself some typing. Continue adding bindings to fill out your multi-tenancy as needed.
Posted On:
28-Sep-2016 01:44
|
Rahul M...
4918
Points
28
Posts
|
For more detail see here https://www.niceonecode.com/Blog/DotNet/MVC/Enabling-Subdomains-on-IISExpress-(localhost)-for-test-multitenancy/15
Posted On:
11-May-2017 21:54
|