在Chrome+Visual Studio中调试asp.net程序很慢的问题(Firefox也有类似问题)

今天开始起在Chrome中调试,发现问题主要出在菜单栏(layout文件)中,google了一番,查到很多原因,不过最终解决方法倒是很简单,特此分享一下:

在C:/Windows/System32/drivers/etc里边有一个hosts文件,用记事本打开,里边最后几行原来是:

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

删掉127前面的#,改成:

# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
# ::1 localhost

立竿见影。

原文载于http://www.wagnerdanda.me/2009/12/asp-net-development-server-slow-on-windows-vista7-with-firefox-or-chrome/,重点内容直接摘录

While developing an ASP.NET website running it on the Visual Studio ASP.NET development server I was noticing that page loads exceedingly slowly in Firefox and Google Chrome after upgrading to Windows 7 (same issue occurs with Windows Vista).

A page refresh would usually take up to 3 seconds (localhost) even without changing the source code (so it should be instantaneously, especially now that I’m using a SSD).

It appears that there is some kind of bug on Vista/Windows 7 with DSN and IPv6, but that can be easily fixed. Here are some of the solutions I have found:

1. Recommended Solution – machine wide: uncomment the localhost address in the hosts file (%WINDIR%/System32/drivers/etc/hosts): (source)

# localhost name resolution is handled within DNS itself.

127.0.0.1 localhost

# ::1 localhost

# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
# ::1 localhost

2. Firefox-only solution: disable IPv6

1. Type about:config in the address bar and press Enter.

2. Scroll down until you find network.dns.disableIPv6.

3. Double-click on it to change its value to true.

4. Restart Firefox.

3. System wide-configuration (option 1):Disable IPv6 Random identifier

netsh interface tcp set global autotuninglevel=disabled

4.System wide-configuration (option 2): Disable IPv6 from Your LAN Interfaces and Connections

1. Launch Vista, click on Start, and then click on Run. Once the Run window appears, type regedit.

2. Once you have accessed the registry, you will add a registry value as follows: (DWORD type) Set to OxFF.

3. The registry is as follows: HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip6/Parameters/DisabledComponents

在Chrome+Visual Studio中调试asp.net程序很慢的问题(Firefox也有类似问题)的更多相关文章

  1. [译]如何在visual studio中调试Javascript

    本文翻译youtube上的up主kudvenkat的javascript tutorial播放单 源地址在此: https://www.youtube.com/watch?v=PMsVM7rjupU& ...

  2. 在iis中调试asp.net程序

    第一步,在iis中新建一个网站,名称为Langben,“物理路径”选择你的程序的根目录,端口你可以随便设置一个数,我这里设置为8888(后面要用到哦). 第二步,应用程序池设置一下 第三步,接下来,在 ...

  3. Visual Studio中用于ASP.NET Web项目的Web服务器

    当您在 Visual Studio 中开发 Web 项目时,需要 Web 服务器才能测试或运行它们. 利用 Visual Studio,您可以使用不同的 Web 服务器进行测试,包括 IIS Expr ...

  4. [No0000AE]在 Visual Studio 中调试 XAML 设计时异常

    在 Visual Studio 中进行 WPF, UWP, Silverlight 开发时,经常会遇到 XAML 设计器由于遭遇异常而无法正常显示设计器视图的情况.很多时候由于最终生成的项目在运行时并 ...

  5. 【翻译】在Visual Studio中使用Asp.Net Core MVC创建第一个Web Api应用(二)

    运行应用 In Visual Studio, press CTRL+F5 to launch the app. Visual Studio launches a browser and navigat ...

  6. 在 Visual Studio 中调试 XAML 设计时异常

    在 Visual Studio 中进行 WPF, UWP, Silverlight 开发时,经常会遇到 XAML 设计器由于遭遇异常而无法正常显示设计器视图的情况.很多时候由于最终生成的项目在运行时并 ...

  7. 在 Visual Studio 中调试时映射调用堆栈上的方法

    本文转自:https://msdn.microsoft.com/zh-cn/library/dn194476.aspx 1.创建代码图,以便在调试时对调用堆栈进行可视化跟踪. 你可以在图中进行标注以跟 ...

  8. 【翻译】在Visual Studio中使用Asp.Net Core MVC创建你的第一个Web API应用(一)

    HTTP is not just for serving up web pages. It's also a powerful platform for building APIs that expo ...

  9. [转]【翻译】在Visual Studio中使用Asp.Net Core MVC创建你的第一个Web API应用(一)

    本文转自:https://www.cnblogs.com/inday/p/6288707.html HTTP is not just for serving up web pages. It’s al ...

随机推荐

  1. SQL Server 内置函数、临时对象、流程控制

    SQL Server 内置函数 日期时间函数 --返回当前系统日期时间 select getdate() as [datetime],sysdatetime() as [datetime2] getd ...

  2. X3850M2安装CertOS 7 KVM 2--Mount

    x3850 m2设备接的存储是DS8000,检查发现系统下有两块disk是IBM2107900,一块容量为215GB,另一块是4GB.原因简单,4GB是以前高可用群集时用来做仲裁盘的. 奇怪的是,每块 ...

  3. ajax+php数据增加查询获取删除

    前段代码部分其实前面已经有写出但是做一点修改所以还是贴出来,可能大家看到代码回不理解,看完图我想大家会理解我为什么这么写了,这和前端布局有关系的,先列出内容在选择内容删除或修改 <!DOCTYP ...

  4. C++引用的作用和用法

    引用就是某一变量(目标)的一个别名,对引用的操作与对变量直接操作完全一样. 引用的声明方法:类型标识符&引用名=目标变量名: 例如: int q; int &ra=a; 说明: &am ...

  5. 应用间共享数据方法(一)---sharepreferce

    SharedPreferences类,它是一个轻量级的存储类,特别适合用于保存软件配置参数. SharedPreferences保存数据,其背后是用xml文件存放数据,文件存放在/data/data/ ...

  6. PCB设计规则考量之初识

    PCB的设计规则可以分布局与走线.布局里最简单的原则就是避免信号之间的干扰,有把模拟部分与数字部分分开,把开关电源与数字部分分开,把端去耦电容靠近端点,而且从端点出来的电容容值按从小到大摆放效果会好些 ...

  7. NLog的使用

    1.项目添加NLog的项目引用: 2.将工程的framework框架改为3.5或4.0,将配置文件[NLog.config]拷贝至运行的bin/(release/debug)路径下 3.项目中代码使用 ...

  8. 理解python的with语句

    Python’s with statement provides a very convenient way of dealing with the situation where you have ...

  9. Json 讲解

    JSON详解 阅读目录 JSON的两种结构 认识JSON字符串 在JS中如何使用JSON 在.NET中如何使用JSON 总结 JSON的全称是”JavaScript Object Notation”, ...

  10. BackgroundWorker组件的作用

    当构建一个图形化的Windows Form桌面应用程序并且需要执行在应用程序主UI线程之外的线程中长时间的任务时,BackgroundWorker类就很有用了. 要使用BackgroundWorker ...