Error serving JavaScript Windows Server 2012 IIS 6.2

0

Hi, I have a Windows Server 2008 with IIS 6.1 in which a website is hosted in ASP, the page is running perfect and javascripts are served correctly: link

But in a Windows Server 2012 with IIS 6.2 the javascripts are not properly served: link

I already provide several solutions. Saving the js as ANSI, configuring the default scripting language in IIS to be JScript, but it has not worked. I do not know if it's a server configuration problem or it's the code. although the code works well on the casper09 server.

Ideas? thank you very much.

    
asked by Samuel 12.03.2018 в 20:56
source

1 answer

0

I have solved the problem, I found that the javascript contained the following character "<%" and this corresponds to an ASP code tag. Since my web site is an ASP site, the server interpreted that as an ASP code tag, even though the file was a javascript (* .js). The way I resolved it was:

1) Right click on the corresponding Application pool and select, Advanced configuration. 2) In ".NET Framework version" change it to "4.0". 3) In "Enable 32 bits", put "True". 4) In "Managed Pipeline mode", put "Integrated".

Once done, add / modify the web.config with the following:

<handlers accessPolicy="Read, Execute, Script">
        <add name="ASP-Classic-in-js" path="*.js" verb="GET,HEAD,POST" modules="IsapiModule" scriptProcessor="%windir%\system32\inetsrv\asp.dll" resourceType="Unspecified" requireAccess="Script" preCondition="bitness64" />
</handlers>

After that, restart the application pool and also the website.

    
answered by 15.03.2018 в 05:31