Google Answers Logo
View Question
 
Q: JavaScript Variable Passing - Works on IIS4 but not on IIS6 ( No Answer,   2 Comments )
Question  
Subject: JavaScript Variable Passing - Works on IIS4 but not on IIS6
Category: Computers > Programming
Asked by: chris21801-ga
List Price: $10.00
Posted: 13 Sep 2006 11:43 PDT
Expires: 13 Oct 2006 11:43 PDT
Question ID: 764939
I'm trying to migrate a website from a NT 4.0/IIS4 environment to a
Win 2003/IIS6 environment. There are JavaScript variables that are
stored in the footer.cfg and navigator.cfg files referenced below:

<script LANGUAGE="javascript" SRC="/CONFIG/FOOTER.CFG"></script>
<script LANGUAGE="javascript" SRC="/CONFIG/NAVIGATOR.CFG"></script>

The above two lines of code are in the <head> section of every
webpage. There are functions in the homescripts.js file referenced
below which use variables that are stored in the footer.cfg and
navigator.cfg files listed above.

<script LANGUAGE="javascript" SRC="/SCRIPTS/HOMESCRIPTS.JS"></script>

The line of code above is found in the <head> section of every webpage
right after the footer.cfg and navigator.cfg lines.

My problem is that the homescripts.js file was able to use the
variables contained in the footer.cfg and navigator.cfg files when it
was running under IIS4. However, this does not work under IIS6 and I
get JavaScript error messages which state that the homescript.js file
sees undefined variables.

I'm not a JavaScript expert and need help solving this problem. I
think it has something to do with the improved security in IIS6
compared to IIS4, but I don't know if the answer lies in modifying an
IIS6 setting, modifying the JS code somehow, or requires a combination
of both. Please help.
Answer  
There is no answer at this time.

Comments  
Subject: Re: JavaScript Variable Passing - Works on IIS4 but not on IIS6
From: sazid-ga on 13 Sep 2006 20:55 PDT
 
hi chris,

IIS6 doesn't serve MIME types it doesn't know about. Previous versions
of IIS were a lot more lenient because of a wildcard MIME mapping.
IIS6 will simply give you a 404 if it doesn't recognize a file
extension.

to set the MIME, go to IIS and Add a MIME type: .cfg, text/plain.

check this out http://support.microsoft.com/?id=326965

or

you can rename the .cfg to .js files.

cheers,
sazid.
Subject: Re: JavaScript Variable Passing - Works on IIS4 but not on IIS6
From: chris21801-ga on 14 Sep 2006 04:23 PDT
 
Thanks Sazid! Adding .cfg as a MIME type is exactly what I needed to
do and it works fine now. Thanks again!

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy