Visual Studio 2010-将本地主机更改为自定义域 [英] Visual Studio 2010 - Change localhost to custom domain

查看:100
本文介绍了Visual Studio 2010-将本地主机更改为自定义域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改,以便调试不会在localhost:randomNumber上发生,而是在自定义域(例如my.testsite.com:randomNumber)上进行?

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

我已将域添加到hosts文件,并且可以在从本地主机调试到my.testsite.com时手动更改url,但是我可以让VS从一开始就从my.testsite.com而不是本地主机?

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?

推荐答案

是的...您可以在项目选项中执行此操作.您可以根据需要指定自定义启动URL以及固定端口.内置的VS服务器将按照您在此处键入的内容进行操作,然后您的hosts文件将为您处理映射.

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.

这篇关于Visual Studio 2010-将本地主机更改为自定义域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆