IIS 6 with wildcard mapping and UNC virtual directory problem

元气小坏坏 提交于 2020-01-01 07:03:29

问题


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


回答1:


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.




回答2:


We recently implemented wildcard mapping for our ASP.NET 1.1 application on a Windows 2003 server and it worked fine until we found that a situation similar to yours where a sub-directory (virtual directory) points to a UNC share generates the same error you have mentiojned.

Removing the wildcard mapping solves the problem but we need the wildcard mapping. So if you have found a solution to your problem, we'll be glad to know about it.




回答3:


Your problem may be that you have the option "Verify that file exists" turned on for your wildcard application map. If this setting is checked, try shutting it off and seeing if that resolves the problem.




回答4:


I made a very detailed answer to this problem here: https://stackoverflow.com/a/20710473/705198

That answer is an accumulation of all the technet, msdn, and blog reference material I could find on the subject, and what we ended up having to do to fix the problem.



来源:https://stackoverflow.com/questions/713025/iis-6-with-wildcard-mapping-and-unc-virtual-directory-problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!