Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running IIS7 and I have fastCGI installed and php code works just fine normally.

Today I added a php file that contained only code an no html to the bin directory. And when I try to access it via http, i get a 404 back.

I've verified the file is on the server, and I've verified that the problem goes away if I move the file out of the bin directory.

My question is why does the bin directory hide php files? (and html files too, incidentally.) Is it some IIS security precaution? If so, what's the risk?


share|improve this question
up vote 0 down vote accepted

The /bin directory is normally protected by IIS by default (well, not by IIS, but by ASP.NET technically). This is done because ASP.NET apps store their dlls in that folder.

Here's a post with some more details and a workaround:

share|improve this answer
thanks. that makes sense. dlls are only used on the server side so why expose it to the web and let people download your dlls willy nilly. – robertpateii Oct 14 '10 at 21:28

404 means IIS couldn't find the file.

To get more specific information I would look at the IIS error log. See

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.