visual-studio 加载配置文件时发生错误:无法开始监视更改,因为已达到网络 BIOS 命令限制

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/607103/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 10:14:10  来源:igfitidea点击:

An error occurred loading a configuration file: Failed to start monitoring changes because the network BIOS command limit has been reached

visual-studiovisual-studio-2005

提问by Josh Stodola

This error just started happening this morning in one particular project. When I try to publish the site it gives me this error and I can't complete the publish! Sometimes restarting Visual Studio magically fixes the problem, but it will just appear again later. Not only that, when I restart VS I lose all my "undo capabilities".

今天早上在一个特定项目中刚刚开始发生此错误。当我尝试发布网站时,它给了我这个错误,我无法完成发布!有时重新启动 Visual Studio 会神奇地解决问题,但它稍后会再次出现。不仅如此,当我重新启动 VS 时,我会失去所有“撤消功能”。

There is a KB articleon the subject, but it did not help.

一篇关于该主题的知识库文章,但没有帮助。

What can I do to stop this very annoyingproblem once and for all?

我能做些什么来一劳永逸地阻止这个非常烦人的问题?

采纳答案by Josh Stodola

Network administrator advised me to run my solutions from the C: of my local development machine. Had to create a batch file to manually copy the source code files over to the network drive throughout the day (so that they get backed up).

网络管理员建议我从本地开发机器的 C: 运行我的解决方案。不得不创建一个批处理文件来手动将源代码文件全天复制到网络驱动器(以便它们得到备份)。

回答by Ben Coffman

It's basically saying you have to many connections running over the network to your code/assebmlies (or whatever you are connecting to). This will solve your problem by telling it to only use 1 and have every connection run through it. I believe this will give you a true solution as opposed to the work around.

它基本上是说你有很多连接通过网络运行到你的代码/程序集(或者你连接的任何东西)。这将通过告诉它只使用 1 并让每个连接都通过它来解决您的问题。我相信这会给你一个真正的解决方案,而不是解决办法。

REMEMBER YOU ONLY NEED TO MAKE THESE CHANGES ON YOUR MACHINE NOT THE MACHINE YOU ARE TYRING TO ACCESS

请记住,您只需要在您的机器上进行这些更改,而不是您想要访问的机器

  • Add the following DWORD value at the following registry key: HKEY_LOCAL_MACHINE\Software\Microsoft\ASP.NET\FCNMode
  • The following list possible values for the FCNMode DWORD value and the behavior that is associated with each value.
  • 0 or greater than 2 - This is the default behavior. For each subdirectory, the application will create an object that will monitor the subdirectory.
  • 1 - The application will disable File Change Notifications (FCNs).
  • 2 - The application will create one object to monitor the main directory. The application will use this object to monitor each subdirectory. I recommend setting the value to 1, to disable the FCN. This is what is causing the error when you try to use the debugger.

    DON'T FORGET: If you are running a 64bit version of windows you will need to go to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ASP.NET

  • 在以下注册表项中添加以下 DWORD 值:HKEY_LOCAL_MACHINE\Software\Microsoft\ASP.NET\FCNMode
  • 下面列出了 FCNMode DWORD 值的可能值以及与每个值关联的行为。
  • 0 或大于 2 - 这是默认行为。对于每个子目录,应用程序将创建一个对象来监视子目录。
  • 1 - 应用程序将禁用文件更改通知 (FCN)。
  • 2 - 应用程序将创建一个对象来监视主目录。应用程序将使用此对象来监视每个子目录。我建议将该值设置为 1,以禁用 FCN。当您尝试使用调试器时,这就是导致错误的原因。

    不要忘记:如果您运行的是 64 位版本的 Windows,则需要转到 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ASP.NET

This post provides a little more in-depth answer: http://bencoffman.com/blog/2010/12/01/Error43AnErrorOccurredLoadingAConfigurationFileFailedToStartMonitoringChangesTo.aspx

这篇文章提供了更深入的答案:http: //bencoffman.com/blog/2010/12/01/Error43AnErrorOccurredLoadingAConfigurationFileFailedToStartMonitoringChangesTo.aspx

回答by Anjisan

Building your solution on C:\ doesn't really solve the issue, it just avoids it. True, that is a good work around, but you still can't build from a shared drive. I faced this same issue in VS and was able to overcome it withoutmoving things locally. Here's what I did:

在 C:\ 上构建您的解决方案并不能真正解决问题,它只是避免了它。确实,这是一个很好的解决方法,但您仍然无法从共享驱动器进行构建。我在 VS 中遇到了同样的问题,并且能够在不在本地移动事物的情况下克服它。这是我所做的:

The Microsoft KB article more or less gets you in the right direction:

Microsoft KB 文章或多或少让您朝着正确的方向前进:

http://support.microsoft.com/kb/810886

http://support.microsoft.com/kb/810886

Be sure to refer to it because the registry keys it tells you to adjust are correct.

请务必参考它,因为它告诉您调整的注册表项是正确的。

On your local machine, either adjust the MaxCmds and MaxMpxCt like the article says, or add them. When I went to check, those values did not exist for me so I had to create them. If you do add them, choose NEW -> DWORD value. After it's created, then double click on the item to adjust the value. Make sure when you edit the DWORD value that you click on the Decimal base and don't use the Hexadecimal base. I put 500 for both MaxCmds and MaxMpxCt. Then restart.

在您的本地计算机上,按照文章所述调整 MaxCmds 和 MaxMpxCt,或添加它们。当我去检查时,这些值对我来说并不存在,所以我必须创建它们。如果确实添加了它们,请选择 NEW -> DWORD 值。创建后,双击该项目以调整值。确保在编辑 DWORD 值时单击十进制基数并且不要使用十六进制基数。我为 MaxCmds 和 MaxMpxCt 设置了 500。然后重新启动。

Next, go to your share server and then do the exact same thing. Restart.

接下来,转到您的共享服务器,然后执行完全相同的操作。重新开始。

The range of values for these registry entries is between 0 and 65535, so you might need to adjust accordingly, but for me 500 worked.

这些注册表项的值范围在 0 到 65535 之间,因此您可能需要相应地进行调整,但对我来说 500 有效。

One last thing... backing up your registry never hurts.. ;)

最后一件事......备份你的注册表永远不会伤害......;)