Well my friend, use SCIENCE!
OK, not really. BUT, SharePoint is a Microsoft.NET application, hosted in Internet Information Services, so we can just add a virtual directory to the SharePoint web application and serve away. Yes, but...
I tried doing just the above once, but didn't discover the secret sauce until just yesterday. Here's the breakdown:
- The 40,000 files are served anonymously (this is actually a good thing)
- Directory access performance isn't really an issue, there aren't a million hits a month let alone a minute.
- There's already a structured navigational approach to finding the files so there's no need to browse them or build a new catalog.
- Establish a virtual directory in your SharePoint web app. If you've got multiple AAMs and/or multiple WFE's you'll have to repeat the following process for each.
- Once you've built the VDIR, double click it's Authentication option. We only needed anonymous so I turned off everything else (More Later).
The change? This time around, instead of using pass-through security on the VDIR, I used the connect as option and connect using an account that has access to the files. That solved the Anonymous access problem I was having. Another solution would be to grant the "Everyone" user access to the files. But that's a problem in and of itself, plus if you're using a remote VDIR it probably won't work unless you make the file share wide open.
The other change? Well you need to make sure you establish a web.config file in the directory you're serving. Just inheriting from the base file in SharePoint's home dir won't work. Until I established a custom web.config, SharePoint tried to intercede and bump the URL up against the content database. Not-found is the same as access denied in that world. So in summary:
- Use a delegation account to access the VDIR
- Establish a web.config that explicitly sets the Anonymous access properties