2

I edited my web.config file to have my .html files parse ASP. Here is the line I added under :

<handlers>            
    <add name="HTML MAPPING" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\system32\inetsrv\asp.dll" resourceType="Unspecified" />           
</handlers>

It works fine for most of the pages, but some pages that have embedded javascript in them, don't load and produce an ERROR 500 page. I don't know why or what to do! When I remove any references to javascript in the pages, they load fine again.

Can anyone help?

8
  • Can you show some of the code that's causing the page to break? Also, do the pages work if they have the standard .asp extension (mapped to the isapi dll in IIS of course)? Commented Jul 21, 2011 at 12:10
  • Thanks for your response. I took one of the pages that is not loading and just changed the extension from .html to .asp. It produced a 500 ERROR when I loaded it. These are pretty old pages and they are layered with forms that have javascript calendars, etc in them. But I still can't figure out why that would be causing any problems! I can't really change the files -- it's a client's machine I am working on. Any insight? Commented Jul 21, 2011 at 12:50
  • It sounds like your Javascript tags are being interpreted as server-side script tags, maybe. Could you show us what they look like? Do they specify type="text/javascript"? Commented Jul 21, 2011 at 12:56
  • Not sure if this will work on your IIS: support.microsoft.com/kb/261200 Commented Jul 21, 2011 at 13:27
  • 1
    WOW! I think that might have worked! You were right. Many of the script tags were just <SCRIPT language=javascript> and I changed them all to: <script language="javascript" type="text/javascript" > and the page loaded. Do you know how good that feels to be staring at an ERROR 500 page for 4 hours and troubleshooting, and all of sudden ... it just loads! THANK YOU for your help. I just hope this works for all the other pages that don't work -- but I'm confident they all share the same problem. Cheers! :) Commented Jul 21, 2011 at 13:39

1 Answer 1

5

It sounds like your Javascript tags are being interpreted as server-side script tags, maybe. Since ASP can't compile them you're getting an internal server error.

Could you show us what they look like? Do they specify type="text/javascript"?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.