R – IIS 6 with wildcard mapping and UNC virtual directory problem

asp.netiis-6netuncvirtual-directory

On our production servers (win 2003 with IIS6 and load balanced with an F5 BIGIP), we have a problem when introducing wildcardmapping on IIS6. We use .net Framework 3.5 SP1.

The issue manifests itself as by the server only sometimes serving the images stored on a virtual directory pointing to a UNC path.
Sometimes the images are displayed, and sometimes not. Removing the wildcard mapping solved this problem.

I will need wildcard mapping on the server for future features, so any help/pointers to if this is a known problem will be very helpful.

In advance, thanks for any help.

Edit:
The exception it fails with is the following:

Message: Failed to start monitoring
changes to
'\ourFileServer\folder1\thumbnails'
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.
Source: System.Web Data:
System.Collections.ListDictionaryInternal
TargetSizeVoid
.ctor(System.Web.DirectoryMonitor,
System.String, Boolean, UInt32)
StackTrace at
System.Web.DirMonCompletion..ctor(DirectoryMonitor
dirMon, String dir, Boolean
watchSubtree, UInt32 notifyFilter)
at
System.Web.DirectoryMonitor.StartMonitoring()
at
System.Web.DirectoryMonitor.StartMonitoringFile(String
file, FileChangeEventHandler callback,
String alias) at
System.Web.FileChangesMonitor.StartMonitoringFile(String
alias, FileChangeEventHandler
callback) at
System.Web.Configuration.WebConfigurationHost.StartMonitoringStreamForChanges(String
streamName, StreamChangeCallback
callback) at
System.Configuration.BaseConfigurationRecord.MonitorStream(String
configKey, String configSource, String
streamname) at
System.Configuration.BaseConfigurationRecord.InitConfigFromFile()

Best Answer

It's been a while since I asked this question. We have now been able to diagnose the problem. In a nutshell, it seems that once you enable wildcard mapping on UNC shares, ASP.net adds file monitors for each subdirectory. In our case, it's a lot of subdirectories. See http://weblogs.asp.net/hosterposter/archive/2006/10/30/Hosting-IIS-with-UNC-content-2D00-Network-BIOS-commands-and-other-errors.aspx.

We will try and fix this by experimenting with different suggestions.