Get Visual Studios to use subdomain?

2019-04-07 23:23发布

While writing an asp.net project i may have this url for testing/debugging

http://localhost:1234/

I have code that takes in account of subdomains. Can i make visual studios call the same code with

http://anysub.localhost:1234/

1条回答
Lonely孤独者°
2楼-- · 2019-04-07 23:45

You can update your hosts file and put in any subdomin for the localhost:

127.0.0.1    example.com
127.0.0.1    sub.example.com

You can then point your browser to either domain. So long as the debugger is attached to IIS/Dev browser, you will be able debug your server side code.

查看更多
登录 后发表回答