Back

Flexi Time System

BIOS command limit error when compiling using Visual Studio on a network share

<MMString:LoadString id="insertbar/linebreak" />

You are getting the following error when trying to build an ASP.net project in Visual Studio from a network share.

An error occurred loading a configuration file: Failed to start monitoring changes to [my path] because the network BIOS command limit has been reached. For more information on this error, please refer to Microsoft knowledge base article 810886. Hosting on a UNC share is not supported for the Windows XP Platform.

I recently got this error when developing an ASP.net web site on a network share to a computer running Windows 2003 server addition. My own PC was running Windows XP Professional with Visual Studio 2005. After reading around alot on the internet, including the knowledge base article mentioned (810886) I struggled to find a working solution.

Numerous users on the net found that their projects on a network share would be building one day but then would suddenly stop building an produce the error. I found this also, and it occurred when the number of folders in the project exceeded a certain level - I confirmed this by setting up a very small project on the network share and this builded fine, but when I tried to build my project with many folders in it, it did not work. This explains why it works one day and suddenly does not the next.

Many people obviously want to work on network shares especially if multiple people are working on the project and source control is not being used, so it is a real pain to have to work locally in these circumstances.

Comments on the internetranged from the following the following:

  • "Visul Studio doesn't support a network based infrastructure with a centralised files, webserver etc when using ASP .NET v2. It seems rather odd that Microsofts flagship development product wouldn't support such functionality"
  • "The ASP NET engine needs to monitor each folder in your web application to catch changes. If the web site is hosted on UNC share, ASP.NET tries to create a Server Message Block connection for each folder in your web site. The maximum number of simultaneous connection is limited from the registry key HKLM/Services... (MS KB 810886). So, if the number of folders in your "UNC web site" is larger then that defined in the registry you will receive the "BIOS limit excedeed error...".
  • "If it's a network share the .NET Framework has all sorts of concerns regarding security. Your best bet is to build then app locally, rather than from a share"
  • " I came across someone else who had the same problem. He found that following the knowledge base didn't solve the problem. His only workaround was to work locally".

Solution

I found one solution that did actually work for me. It involes changing a registry key using regedit on your client (eg XP professional) machine. Remember to backup your registry and be careful when changing any settings in there - we accept no responsibility for any problems that might occur!

So the solution that works for me was:

  1. Add the following DWORD value at the following registry key:

    HKLM\Software\Microsoft\ASP.NET\FCNMode
  2. 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.

More information on Microsoft's site.

Back


Make a Comment on this Article

Your Name:
Comment:

 

Net-Aspect Wakefield (West Yorkshire) Web Design Services Call 01924 918 177