Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

thanks.

share|improve this question

2 Answers 2

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:

http://www.eggheadcafe.com/software/aspnet/30510465/iis-60-generating-4041-error-for-bin-subdirectory.aspx

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 http://serverfault.com/questions/84833/iis-7-log-file-directory

share|improve this answer

Your Answer

 
discard

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.