• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 220
  • Last Modified:

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
0
dbashley1
Asked:
dbashley1
  • 3
1 Solution
 
Brad HoweCommented:
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 HoweCommented:
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
 
Brad HoweCommented:
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

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now