How to configure subdomains in the development environment - asp.net?

I would like to know a method for setting up subdomains in a development environment. You do not have a hosting account yet. But I would like to test it internally, simulating a similar setting, which will be provided by the hosting company later.

Thank!

+3
source share
3 answers

Open the file C:\Windows\System32\Drivers\etc\hostsin Notepad (make sure you run Notepad as an administrator) and add a bunch of entries like this:

127.0.0.1 test1.local 
127.0.0.1 test2.local 
127.0.0.1 test3.local

, , . http://test1.local/ ( VS, ). , , :)

+2

( ) ,

C:\WINDOWS\system32\Drivers\Etc\

.

127.0.0.1 local.mysite.com
127.0.0.1 sub1.mysite.com
127.0.0.1 sub2.mysite.com
+4

If you use IIS on your development server to replicate the terms of your hosting company, make sure host headers are also configured.

http://technet.microsoft.com/en-us/library/cc753195%28WS.10%29.aspx

0
source

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


All Articles