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?

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Adam
  • 19
  • 2
  • 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)? – James McCormack Jul 21 '11 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? – Adam Jul 21 '11 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"? – Brian Beckett Jul 21 '11 at 12:56
  • Not sure if this will work on your IIS: http://support.microsoft.com/kb/261200 – James McCormack Jul 21 '11 at 13:27
  • Maybe this helps too? http://stackoverflow.com/questions/2640526/detailed-500-error-message-asp-iis-7-5 – James McCormack Jul 21 '11 at 13:29
  • 1
    WOW! I think that might have worked! You were right. Many of the script tags were just – Adam Jul 21 '11 at 13:39
  • Suggest @CosmicFlame write up his answer and you accept it Adam. Points all round! – James McCormack Jul 21 '11 at 14:02
  • Sweet :D Glad I could help! I have to confess, I've never used classic ASP, but the behaviour seemed to fit with what I'd expect from a client tag being treated as a server tag. Good luck with the rest of your pages :) (I've posted my comment as an answer now) – Brian Beckett Jul 21 '11 at 14:19

1 Answers1

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"?

Brian Beckett
  • 4,742
  • 6
  • 33
  • 52