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
dbashley1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Brad HoweDevOps ManagerCommented:
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
0
Brad HoweDevOps ManagerCommented:
Hi There,

Just re-read those articles and really don't like them to much. I think i blog this :)

Here is the Coles note version.

1. Create a CONNECT AS Account that has access to the share.
2. Create the share with the permissions you require. Make sure you test it \\server\....

Virtual Path Network Shared content for IIS6
3. Open IIS Manager.
4. Right click on your site, New, Virtual Directory
5. Alias = photos
6. Path = \\FILESERVER\SHARENAME\photos
7. Uncheck (alwaysuse authenticated users creds)
8. Enter User name : DOMAIN\USER.NAME and Password x2
9. Grant Read Access.
10. NEXT and FINISH


Virtual Path Network Shared content for IIS7
3. Open IIS Manager.
4. Right click on your site and click Add Application.
5. Alias = photos     -     Application Pool=Your Default one for the site is fine.
6. Path = \\FILESERVER\SHARENAME\photos
7. Click CONNECT AS followed by clicking SPECIFIC USER:
8. Click SET, Enter User name : DOMAIN\USER.NAME and Password x2
9. Click OK
10. Click TEST SETTINGS. Should see green checks for all access.
11. OK

Test : http://server.com/photos/somephoto.jpg

cheers,
Hades666  
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Brad HoweDevOps ManagerCommented:
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

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.