获得视觉工作室使用子域名? [英] Get Visual Studios to use subdomain?

查看:206
本文介绍了获得视觉工作室使用子域名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在写一个asp.net的项目,我可能有这个网址进行测试/调试

 的http://本地主机:1234 /

我有code,它发生在帐户子域。我可以让视觉工作室调用同一个code以

  HTTP://anysub.localhost:1234 /


解决方案

您可以更新自己的 的主机文件,并把任何subdomin为本地主机:

  127.0.0.1 example.com
127.0.0.1 sub.example.com

您就可以将浏览器指向是域。只要调试器附加到IIS /开发的浏览器,你就可以调试服务器端code。

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/

解决方案

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.

这篇关于获得视觉工作室使用子域名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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