1

I have a legacy website in which .HTML, .ASP, and .INC files are being used. Problem is all pages have VBScript code not parsed by IIS and thus written on page as static text. I want to fix it. All .html pages include both .ASP and .INC for scripts.

Now currently IIS Handlers are as below: all .htm, .html, .inc have IsapiModule handlers as well as ServerSideIncludeModule. This is what I suspect causing issue. So now if I remove ServerSideIncludeModule handlers and just keep IsapiModule, it parses VBScritpt correctly but HTML pages with INC inclusion do not open but ask to save a file to download. What am I missing here? This worked on my localhost fine but not on Production.

How can I fix this issue?

Thank you!

user138897
  • 11
  • 3

1 Answers1

0

How about you fix the underlying problem: the fact that you have server code in a file that is not meant to be read by the server. Change the extension from .html to .asp. Problem solved.

Brent Pabst
  • 6,059
  • 2
  • 23
  • 36
  • If that was possible, I would have done that. It's an old website and company wont spend much resource time doing renaming, cleaning up, redirecting etc. – user138897 Sep 28 '12 at 19:12
  • I hate to tell you this, but undoing the default behaviors in IIS to handle HTML as a server executed file is not going to be easy as you have discovered, may end up being faster to rename the files and refactor the code. Could easily be scripted out for the most part. – Brent Pabst Sep 28 '12 at 19:39