问题描述
是否可以在Visual Studio 2008中更改开发服务器启动的主机名?最终,我希望Visual Studio直接从 http://localhost.:xxxx/开始(请注意句点) .当我进行更多的Ajax类型调用时,我发现我需要使用诸如Fiddler之类的工具来检查响应/请求,从而更频繁地检查流量. (提琴手无法通过 http://localhost/查看请求,因为它们没有通过常规网络堆栈.)
Is it possible to change the hostname that the development server fires up in visual studio 2008? Ultimately I would like visual studio to start directly on http://localhost.:xxxx/ (note the period). As I am doing more ajax type calls I find that I need to inspect traffic more often using tools like fiddler to check responses/requests. (Fiddler cannot see requests over http://localhost/ as they do not traverse the regular network stack).
我浏览了Web服务器配置页面,但是没有任何内容跳出来.
I looked through the web server configuration page but nothing jumped out.
我并不是特别想在包装盒上配置IIS,但会以令人信服的答案来考虑它.
I don't particularly want to go the route of configuring IIS on the box but would consider it with a compelling answer.
推荐答案
如果设置简单,则可以尝试在v2.2.4.0中添加新选项.
If you have a simple setup, you might try a new option added in v2.2.4.0.
在注册表内HKCU \ Software \ Microsoft \ Fiddler下,添加一个名为 HookWithPac 的新Reg_SZ,其值设置为 True .您应该发现Fiddler现在使用简单的PAC脚本注册为系统代理,而不是手动指定127.0.0.1:8888.反过来,这导致IE将LocalHost流量发送到Fiddler.
Inside the registry, under HKCU\Software\Microsoft\Fiddler, add a new Reg_SZ named HookWithPac with the value set to True. You should find that Fiddler now registers as the system proxy using a simple PAC script rather than manually specifying 127.0.0.1:8888. This, in turn, causes IE to send LocalHost traffic to Fiddler.
请告诉我这是否适合您!
Please let me know if this works out for you!
这篇关于强制Visual Studio使用主机名localhost启动开发服务器. (以句号结尾)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!