views:

711

answers:

3

I'm running IIS 5 on a Windows 2000 machine.

I have an application setup in my "scripts" directory in my website, because it runs some compiled DLL's. The application is set to run scripts and executables.

For some reason, when I try and access any .js files in that directory, I get "The system cannot find the file specified.". I tried adding .js as a "text/javascript" mime type, to both the website and the directory, but it doesn't seem to help.

I also checked the web server itself, and the .js mime type was set to application/octet-stream. I changed it to text/javascript, but it still doesn't work. Do I need to restart IIS or the application pool? Or am I looking in the wrong place.

I also tried using text/text and text/html but that didn't help.

I am able to access .htm, .jpg, and even .asp files in that directory.

Any ideas? Thanks in advance!

A: 

I would use the FileMon tool to see if IIS is even trying to access the JS files. It could be a security problem.

David
A: 

Does the IIS account have read access to the directory?

Do .js files work in any other virtual directory on the server?

SLaks
A: 

URLSCAN!!!!!

I checked the log directory for URLScan and it was blocking files based on the .js extension. I added it to the urlscan.ini, restarted IIS, and voila! It worked!

More Info:

Directories: URLScan - C:\WINNT\System32\inetsrv\urlscan\ URLScan logs - C:\WINNT\System32\inetsrv\urlscan\logs\ URLScan INI file - C:\WINNT\System32\inetsrv\urlscan\urlscan.ini

SkippyFire