开发者

Parse HTML as ASP using Web.config but getting error when JavaScript is in the page

开发者 https://www.devze.com 2023-03-22 03:16 出处:网络
I edited my web.config file to have my .html files parse ASP.Here is the line I added under : <handlers>

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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消