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

10,578

Solution 1

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).

Solution 2

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.

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

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

Solution 3

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 without moving things locally. Here's what I did:

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

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.

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.

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

Share:
10,578
Josh Stodola
Author by

Josh Stodola

I make things happen. I am a seasoned web developer with 15+ years of experience. I am fluent in CSS and Javascript. On the server-side, I prefer the Microsoft stack (.NET) but am not opposed to anything that works. I have ten years of experience working with legacy IBM mainframe systems, which helps me appreciate how far we have come as software engineers. Twitter " There are any number of ways to do this, and most of them are wrong "

Updated on June 05, 2022

Comments

  • Josh Stodola
    Josh Stodola almost 2 years

    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".

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

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

  • Josh Stodola
    Josh Stodola about 15 years
    There is a risk involved with adjusting this value, by the way. In my case, the network administrator refused to change it on the server.
  • Kiquenet
    Kiquenet almost 6 years