Asp.net subdomain setup on localhost

I added the following entries to the HOSTS file.

127.0.0.1 abc.localhost.com
127.0.0.1 xyz.localhost.com

Using the VS2010 ASP.NET Development Server, I cannot start or execute a website.

When viewing http: // localhost: 2687 / TestProject / , the default.aspx page is displayed. But when accessing http: //abc.localhost: 2687 / TestProject /, it shows that the page cannot be found.

Is there anything else that needs to be done when setting up the subdomain on localhost.

EDIT . To do this, I deleted .com and in IE -> Connections -> LAN, disable everything. Subdomains with port operations are forwarded correctly. Nothing else needs to be configured.

+3
source share
2 answers

The obvious mistake is that in your hosts file you have abc.localhost.com, while you are browsing http: //abc.localhost/folder

Not the same.

Not sure if this will work the way you plan. I would also recommend IIS Express, part of WebMatrix, which I think is still in beta or just using IIS. IIS 7+ on Vista, W7, Server 2008 is all very easy to use.

+2
source

Use IIS or IIS express, not Cassini. (For several reasons you can search on Google or search on stackoverflow)

With IIS, you can easily add a host entry to your web application in just 2 clicks.

, Url, . abc.localhost abc.localhost2687, (80). abc.localhost: 2687, - , Url .

( IIS 6, IIS 7 IIS 7.5 )

enter image description here

+2

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


All Articles