javascriptweb-applicationsmime-typesiis-5directory-permissions

Can’t get IIS to serve .js files from a specified directory


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!


Solution

  • 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