Link to home
Start Free TrialLog in
Avatar of dbashley1
dbashley1

asked on

Create a folder that links to UNC path

I have a web farm app.  Within this web app is a very large photo archive.  I would like to share this archive with another web app.

I don't want to have to keep duplicate copies of the archive under the web root folder for each app.  How can I set this up so that I can have a folder on the file server that will deliver the same file to both
http://www.app1.com/photos/photo1.jpg and http://www.app2.com/photos/photo1.jpg.

Hope that makes sense.

Thanks for your help
Avatar of Brad Howe
Brad Howe
Flag of Canada image

Simple enough for you.

You need to create a virtual directory on both webapps called /photos which inturn is a UNC PATH (\\FILESERVER\SHARENAME\photos) to your content.

Here is how to create them in IIS6 and IIS7.

IIS6  -http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/cd02642c-8389-4563-9cd2-bae8a516c722.mspx?mfr=true

IIS7 - http://msdn.microsoft.com/en-us/library/bb763173.aspx

Let us know if you have any issues.
Hades666
ASKER CERTIFIED SOLUTION
Avatar of Brad Howe
Brad Howe
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
And more point. The reason the virtual path for IIS7 is an APPLICATION and not a virtual directory is because of the IIS managed pipeline.

IF you are running an app with an application Pool in Integrated mode, you will given HTTP error 500.19. This is why you need to make it an application or else it complains about not being able to read/write a web.config. Even if it exists the error appears.

IF you are running an app with an application Pool in Classic mode, you will get the image without issue.

Hope it helps,
Hades666