locked
VBScript server tags in ASP pages not recognized in IIS 8.5 RRS feed

  • Question

  • User-615362927 posted

    I'm migrating an ASP web app from IIS 6 to IIS 8.5, and none of the server tags (<% %>) which contain VBScript are being recognized.  In some cases, they're being ignored, in other cases, they are being displayed as text along with the VBScript code they contain.  For example, this VBScript is displayed as plain text inside a TextBox instead of evaluating to a string value:

    <%=Session("EmpName")%>

    I have made numerous configuration changes to enable ASP:

    • Installed ASP and ISAPI on Windows Server 2012.
      - Enabled Active Server Pages under the root server node in IIS Manager.
      - Enabled Parent Paths under ASP for the website in IIS Manager.
      - Enabled ASPClassic IsapiModule under Handler Mappings for website.
      - Enabled ISAPI-dll (IsapiModule) and CGI-exe (CgiModule) under Handler Mappings for website.
      - Created a series of ServerSideIncludeModules for .asp and other related file extensions under Handler Mappings.
      - Verified there are no MIME Types for .asp for the website in IIS that might interfere by rendering it as static content.
    • After making all these settings, ASP pages render fine -- but I still have the issue with the one that makes extensive use of VBScript inside server tags (<% %>).  The VBScript is not recognized and does not get rendered properly.
    • What else needs to be done to resolve this?
    • Thank you -
      Kevin
    Wednesday, April 15, 2020 6:12 PM

All replies

  • User-848649084 posted

    Hi,

    Did you enable the dynamic content compression in iis? could you please share the iis installed feature snapshot? what is your page file extension ? also provide some sample code to reproduce the issue.

    Thursday, April 16, 2020 5:50 AM
  • User-615362927 posted

    Hi Jalpa -

    • Both Dynamic and Static Content Compression are enabled for this website in IIS. Toggling these settings on/off had no impact.

    • IIS installed feature snapshot:   This is from Select Server Roles > Web Server (IIS) > Web Server > Application Development in Server Manager -- all of these items are installed and there are none left unselected:

        .NET 3.5 Extensibility
        .NET 4.5 Extensibility
        Application Initialization
        ASP
        ASP.NET 3.5
        ASP.NET 4.5
        CGI
        ISAPI Extensions
        ISAPI Filters
        Server Side Includes
        Web Socket Protocol

    Page file intention:   Not quite sure what you’re asking here -- are you concerned about page file size?

    Sample code:

     

                    <table border="1" width="550" id="table1" cellpadding="2" cellspacing="0">

                       <tr>

                                    <td nowrap>

                                       <p class="BODY_TEXT2">Name:

                                                    <input type="text" name="EmpName" size="45" class="BODY_TEXT2" value='<%=Session("EmpName")%>' readonly></td>

                                    <td nowrap>

    Thursday, April 16, 2020 1:59 PM
  • User-848649084 posted

    Your file extension is .asp or .vbs? 

    Friday, April 17, 2020 9:34 AM
  • User-615362927 posted

    File extension is .asp and it contains embedded VBScript.  This is the first line of the file: 

    <%@ Language=VBScript%>

    Friday, April 17, 2020 4:09 PM
  • User-1244942384 posted

    I'm having the same problem.  Any solution?

    Tuesday, July 28, 2020 11:47 PM
  • User676952543 posted

    Was getting the same problem, now I have executed successfully. You may check the extension of the file. Is it filename.asp or filename.asp.txt. correct one is filename.asp. this simple video    https://youtu.be/5nlZeIYasMI helps me 

    Sunday, May 23, 2021 9:23 PM