We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

VBScript server tags in ASP pages not recognized in IIS 8.5RSS

6 replies

Last post May 23, 2021 09:23 PM by Geeksm12

‹ Previous Thread|Next Thread ›
  • VBScript server tags in ASP pages not recognized in IIS 8.5

    Apr 15, 2020 06:12 PM|kevroberts|LINK

    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
  • Re: VBScript server tags in ASP pages not recognized in IIS 8.5

    Apr 16, 2020 05:50 AM|Jalpa Panchal|LINK

    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.

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
  • Re: VBScript server tags in ASP pages not recognized in IIS 8.5

    Apr 16, 2020 01:59 PM|kevroberts|LINK

    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>

  • Re: VBScript server tags in ASP pages not recognized in IIS 8.5

    Apr 17, 2020 09:34 AM|Jalpa Panchal|LINK

    Your file extension is .asp or .vbs? 

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
  • Re: VBScript server tags in ASP pages not recognized in IIS 8.5

    Apr 17, 2020 04:09 PM|kevroberts|LINK

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

    <%@ Language=VBScript%>

  • Re: VBScript server tags in ASP pages not recognized in IIS 8.5

    Jul 28, 2020 11:47 PM|disaia|LINK

    I'm having the same problem.  Any solution?

  • Re: VBScript server tags in ASP pages not recognized in IIS 8.5

    May 23, 2021 09:23 PM|Geeksm12|LINK

    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 

‹ Previous Thread|Next Thread ›