Why do Microsoft not recommend using UNC paths in IIS? What is the alternative?

7,185

Solution 1

File change notification is an issue especially when running content remotely. I've supported sites running with all content / code on a remote share. My recommendation is #2 using DFS for static content and putting code locally on a server. This requires some design in your application such as putting images, css, js files etc in the same location. Here is several articles I've accumulated over the years and posted to.

http://www.iislogs.com/Tags/unc

here is probably the one article people refer to most http://technet.microsoft.com/en-us/library/dd296694(v=ws.10).aspx

Solution 2

Accessing files from a disk is the preffered way, as it's less prone to errors and (usually) gives you better performance.

I see three solutions here:

A: Use something to push out new files/configuration from a central repository. Many people use subversion for this. Microsoft also has their own free tool - Web Deploy

B: Implement Microsoft DFS and have at least two active servers with the same set of file storage on them. This will make it more available in case of a fail over, but it will still kill your IIS when a failover occurs. For INSTANT failover see point C.

C: Use a file server cluster. I'm 99.9999% sure that this is way, way overkill. You'll also need to implement a fully redundant network.

Share:
7,185

Related videos on Youtube

John H
Author by

John H

Updated on September 18, 2022

Comments

  • John H
    John H over 1 year

    I have an IIS site, and one of the virtual directories is actually on a separate server, accessed via a UNC path.

    Every now and then (several times a day) the ASP.Net application restarts, and in the event log I get :

    Event message: Application is shutting down. Reason: Configuration changed.

    Now, I know that the configuration has not changed, however I am able to recreate the problem in a test environment by temporarily making the UNC path unavailable, and then requesting a file from it.

    I happened to stumble over the following gem on an unrelated KB article (269009):

    Microsoft does not recommended using UNC-mapped content on high-capacity Web sites

    Now, my question is: Why don't MS recommend using UNC Paths, and what alternatives should I be using instead?

  • John H
    John H about 11 years
    When you say a file server cluster, wouldn't I still need to access that over UNC paths?
  • pauska
    pauska about 11 years
    Yes, but the UNC path would basically never go down unless you experience network outages.