• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 434
  • Last Modified:

Problems running js files on MS-IIS.

We have installed IIS 4.0, and try to operate our application there (HTML+client JavaScript+PERL CGIs).
We could operate JavaScripts that were written in the same file as the HTML.
We could not operate JavaScripts that were on a separate file with a ".js" extension:
<SCRIPT LANGUAGE="JavaScript" SRC="test.js" >
In the application mapping (In the definition of the site->Properties->Home Directory->Configuration) we mapped "js" to "Jscript.dll".
The result was some numbers thrown on the browser -
16389 (0x00004005).
What's wrong with what we had done, and what should be done?
How can one operate from IIS a JavaScript which is in a different file than the HTML?
  • 3
  • 2
1 Solution
Gadi031698Author Commented:
Edited text of question
Gadi031698Author Commented:
Adjusted points to 150
Can you send me the .js file and the associated page?  masseym@hotmail.com
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Michel PlungjanIT ExpertCommented:
You need to map it to the mime type


js is executed by the browser, not the server.
Gadi031698Author Commented:
I have definition for this mime-type in my browser, but I think there should be a similar one on the server. Where is the exact place this definition should be?
Michel PlungjanIT ExpertCommented:
Setting MIME Type for JS on Microsoft IIS3 Server

   1.From the server, run REGEDT32.
   3.From the menu bar, select Edit, Add Value,
   4."Add Value" dialog box prompts for the "Value Name"
   5.Enter "application/x-javascript,js,,<" Don't enter the quotes.
   6.Press Enter.
   7.an "String Editor" dialog box prompts for the "String"
   8.Press Enter, we leave it blank.
   9.You should be able to find application/x-javascript in the list now.

Setting MIME Type for JS on Microsoft IIS4 Server

        Go into the IIS4 Manager

        Right-click on your IIS4 server name and choose Properties.

        Click on the "File Types" button under Computer MIME Map.

           Extension     Content Type
           ---------     ------------
           .js           application/x-javascript

Hope this helps

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now