-
Network BIOS
Good morning Guys,
Not sure if this is the best place in the forum to put this on but here goes..
The application that I've written seems to keep showing the below error:
Code:
The network BIOS command limit has been reached
System.ComponentModel.Win32Exception: The network BIOS command limit has been reached
Bit of background:
Application contains some filewatchers watching a network directory and is looking for created events.
Application is written in C# and is running on a 64Bit machine running Windows 7 Professional with .Net Framework 4.
Network it connects to is a 32Bit Windows 2003 Server.
We have edited a registry setting already on the server the MaxCmds and MaxCpts values but still getting it. Seems to get it at random times but of late it just seems to get worse.
Any ideas on this?
Thanks
-
Re: Network BIOS
Are you using the FileSystemWatcher?
-
Re: Network BIOS
-
Re: Network BIOS
At what statement do you get the error?
-
Re: Network BIOS
I only get it at run time...can't seem to get it when I'm debugging..
The error is being chucked at by the ErrorEventHandlers attached to the filewatcher. I've got a script on there to destroy the filewatcher again before recreating it but there seems to be occasions when the app takes a long while before the filewatcher goes alive.
-
Re: Network BIOS
Is there any specific reason you are recreating the filewatcher?
And how occasionally does that happen?
-
Re: Network BIOS
No specific reason to recreate the filewatcher other than I had this theory that the network connection drops out every now and then so recreating the filewatcher was best suited because i have noticed that occasionally, before I've added the recreation of FWs, FWs just seem to ignore newly created files until app restart.
Network BIOS error has been happening almost daily (at most) recently, before Christmas.
I really am confused as to why this is all happening as the filewatcher has been installed for at least 2 years and I know I've done a couple of upgrades to the app along the way but it was like at least a year ago since the app had been modified. :S
-
Re: Network BIOS
But at what frequency do you recreate the FW?
Is it at a fixed rate, or do you recreate when the connection drops?
-
Re: Network BIOS
I recreate it whenever the fw triggers the ErrorHandler event.
If it helps, here is an extract code of one of my filewatchers
Code:
void fswJetForm_Error(Object sender, ErrorEventArgs e)
{
Exception mainEx = e.GetException();
this.FormExceptions(mainEx, "JetForm Filewatcher");
_fswJetform.Dispose();
_fswJetform = new FileSystemWatcher();
while (!_fswJetform.EnableRaisingEvents)
{
try
{
if (!Directory.Exists(_strJetFormLocation))
Directory.CreateDirectory(_strJetFormLocation);
this._fswJetform.SynchronizingObject = this;
this._fswJetform.Path = _strJetFormLocation;
this._fswJetform.Filter = "RDI_*.txt";
this._fswJetform.Created +=
new FileSystemEventHandler(fswJetForm_Created);
this._fswJetform.Error +=
new ErrorEventHandler(fswJetForm_Error);
this._fswJetform.EnableRaisingEvents = true;
}
catch
{ Thread.Sleep(5000); }
}
this.lstLog.Items.Add("JetForm filewatcher back online @: " +
DateTime.Now.ToString("dd-MM-yyyy HH:mm"));
}