强制 Visual Studio 使用主机名 localhost 启动开发服务器.(句号结尾) [英] Force visual studio to start development server using the hostname localhost. (with period at end)

查看:36
本文介绍了强制 Visual Studio 使用主机名 localhost 启动开发服务器.(句号结尾)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以更改开发服务器在 Visual Studio 2008 中启动的主机名?最终,我希望 Visual Studio 直接在 http://localhost.:xxxx/ 上启动(注意句号).当我执行更多 ajax 类型调用时,我发现我需要更频繁地使用 fiddler 之类的工具检查流量来检查响应/请求.(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.

在注册表中的 HKCUSoftwareMicrosoftFiddler 下,添加一个名为 HookWithPac 的新 Reg_SZ,并将值设置为 True.您应该会发现 Fiddler 现在使用简单的 PAC 脚本注册为系统代理,而不是手动指定 127.0.0.1:8888.反过来,这会导致 IE 将 LocalHost 流量发送到 Fiddler.

Inside the registry, under HKCUSoftwareMicrosoftFiddler, 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 启动开发服务器.(句号结尾)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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