在Chrome+Visual Studio中調試asp.net程式很慢的問題(Firefox也有類似問題)

來源:互聯網
上載者:User

今天開始起在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

 

點擊下載免費的敏捷開發教材:《火星人敏捷開發手冊》

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.