Visual Studio 2010 - Change localhost to custom do

2020-03-20 13:31发布

How do I change so that debugging doesn't happen on localhost:randomNumber but on a custom domain like my.testsite.com:randomNumber?

I've added the domain to the hosts file and I can manually change the url when debugging from localhost to my.testsite.com, but can I make VS start at my.testsite.com from the get-go instead of localhost?

1条回答
再贱就再见
2楼-- · 2020-03-20 13:44

Yes... you do that in the project options. You can specify a custom startup URL as well as a fixed port if you want. The built-in VS server will follow whatever you type there, then your hosts file will take care of the mappings for you.

查看更多
登录 后发表回答