views:

29

answers:

2

I have a web application that has a configuration folder that houses multiple XML files that are configuration settings for multiple "portals" as you will. I need IIS to have access to them so the "portal" loads (sql connection strings, master page paths) but I want to deny any outside access (url browsing). Here's an example below:

http://www.mywebsite/virtualdirectory/configurationdirectory/configfile.xml

I need to restrict access to this file if you're browsing to it but still allow the system access to it so it can parse the "portal" that it's loading.

Any ideas?

+1  A: 

You could do this with a rewrite rule

You can also do this with a Request Filtering rule

Conrad Frix
Thanks so much Conrad!!! The Request Filtering is EXACTLY what I wanted!!
Keith
A: 

If the website doesn't need to serve XML files to the end user then remove it as a MIME type.

notandy
This DOES cure the problem that I'm having but I went with Conrad's answer because I might want to serve XML files in another directory and/or setup security different. If I remove it as a MIME value, then I can't access it anywhere. But, thanks for the answer. This works too!
Keith
No problemo. You could also remove the MIME value for just that folder.
notandy