Opening ASP page causes file download dialog instead

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Neil Rossi

    Opening ASP page causes file download dialog instead

    I have an issue with a particular ASP page on two web servers. Let's
    call these servers Dev1 and Beta1. Both Servers are running IIS 5,
    Windows 2000 SP4 with "almost" all of the latest patches.

    On Beta1, I am able to execute a particular page with no problem, that
    page opens up in the comes up just fine.

    On Win2kdev1, when I go to execute the same page, it opens a file
    download dialog and asks me whether I want to open or save the "file".
    Other ASP pages in the same directory display correctly. As far as I
    can tell, there is nothing obviously different between these working
    pages and the ASP page which causes the download dialog to open. The
    filetypes are all .ASP.

    I have verified that the app mappings (in IIS Manager,
    Directory/Configuration/App Mappings) are correctly set to point to
    asp.dll. I have removed and reset the app mapping just in case, but
    still get the same error. The problem can arise on a different page
    by doing something as trivial as changing some text and saving the
    page.

    I have compared file permissions on the file on both servers and they
    are exactly the same. I thought something was wrong with the page on
    Win2kDev1, so I copied over the page from Beta1. Same problem. I
    have checked the IIS logs, and I do not see any errors in the
    ex060120.log (for the last date that I tested this).

    Does anyone have any ideas for anything I can look at to try to figure
    out this issue? TIA.

    -- Neil Rossi
  • David Wang [Msft]

    #2
    Re: Opening ASP page causes file download dialog instead

    For the page that causes the file download dialog, use WFetch to make the
    same request and post the raw response.



    If it happens on random pages and not specific pages, then I would not look
    at Application Mapping (which would be consistent) nor the script in the
    page (which would be consistent unless the problem is server-specific).

    Also, can you report the Global and Site ISAPI Filters installed on both
    machines.

    My suspicion right now is that some ISAPI Filter is mistakenly adding
    certain response headers to ASP pages such that the browser asks to download
    the page instead of displaying it.

    --
    //David
    IIS

    This posting is provided "AS IS" with no warranties, and confers no rights.
    //

    "Neil Rossi" <rossi@kdvsyste ms.com> wrote in message
    news:9qait1t2mh con1msgesqpt9r4 1gj66ak13@4ax.c om...[color=blue]
    >I have an issue with a particular ASP page on two web servers. Let's
    > call these servers Dev1 and Beta1. Both Servers are running IIS 5,
    > Windows 2000 SP4 with "almost" all of the latest patches.
    >
    > On Beta1, I am able to execute a particular page with no problem, that
    > page opens up in the comes up just fine.
    >
    > On Win2kdev1, when I go to execute the same page, it opens a file
    > download dialog and asks me whether I want to open or save the "file".
    > Other ASP pages in the same directory display correctly. As far as I
    > can tell, there is nothing obviously different between these working
    > pages and the ASP page which causes the download dialog to open. The
    > filetypes are all .ASP.
    >
    > I have verified that the app mappings (in IIS Manager,
    > Directory/Configuration/App Mappings) are correctly set to point to
    > asp.dll. I have removed and reset the app mapping just in case, but
    > still get the same error. The problem can arise on a different page
    > by doing something as trivial as changing some text and saving the
    > page.
    >
    > I have compared file permissions on the file on both servers and they
    > are exactly the same. I thought something was wrong with the page on
    > Win2kDev1, so I copied over the page from Beta1. Same problem. I
    > have checked the IIS logs, and I do not see any errors in the
    > ex060120.log (for the last date that I tested this).
    >
    > Does anyone have any ideas for anything I can look at to try to figure
    > out this issue? TIA.
    >
    > -- Neil Rossi[/color]


    Comment

    • Neil Rossi

      #3
      Re: Opening ASP page causes file download dialog instead

      Thanks for your response, David. There are, as far as I can see, no
      ISAPI filters defined within INetMgr, either for this specific website
      or at the Default website level.

      Just for the heck of it, I logged in to the remote server and ran the
      app throwing the error using localhost. Now I see that the page
      showing the download dialog on a remote client, is actually displaying
      a "500 Internal Server Error" when logged in to the IIS server.

      Here's the log output from WFetch run on the server Win2kDev1. I am
      trying to load the page final.asp, so this error page doesn't seem to
      give me much info.
      ------------------------------
      started....
      WWWConnect::Con nect("localhost ","443")\n
      source port: 2065\r\n
      REQUEST: **************\ n
      GET /onlineservices/grantapp/final.asp HTTP/1.1\r\n
      Host: localhost\r\n
      Accept: */*\r\n
      \r\n
      RESPONSE: **************\ n
      HTTP/1.1 200 OK\r\n
      Server: Microsoft-IIS/5.0\r\n
      Date: Fri, 27 Jan 2006 18:30:47 GMT\r\n
      Connection: close\r\n
      Content-Type: application/octet-stream\r\n
      Cache-control: private\r\n
      Content-Length: 7860\r\n
      \r\n
      <%@ language="VBScr ipt" %>\r\n
      <%\r\n
      Option Explicit\r\n
      \r\n
      Const lngMaxFormBytes = 200\r\n
      \r\n
      Dim objASPError, blnErrorWritten , strServername, strServerIP,
      strRemoteIP\r\n
      Dim strMethod, lngPos, datNow, strQueryString, strURL\r\n
      \r\n
      If Response.Buffer Then\r\n
      Response.Clear\ r\n
      Response.Status = "500 Internal Server Error"\r\n
      Response.Conten tType = "text/html"\r\n
      Response.Expire s = 0\r\n
      End If\r\n
      \r\n
      Set objASPError = Server.GetLastE rror\r\n
      %>\r\n
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\r\n
      \r\n
      <html dir=ltr>\r\n
      \r\n
      <head>\r\n
      <style>\r\n
      a:link\t\t\t{fo nt:8pt/11pt verdana; color:FF0000}\r \n
      a:visited\t\t{f ont:8pt/11pt verdana; color:#4e4e4e}\ r\n
      </style>\r\n
      \r\n
      <META NAME="ROBOTS" CONTENT="NOINDE X">\r\n
      \r\n
      <title>The page cannot be displayed</title>\r\n
      \r\n
      <META HTTP-EQUIV="Content-Type" Content="text-html;
      charset=Windows-1252">\r\n
      </head>\r\n
      \r\n
      <script> \r\n
      function Homepage(){\r\n
      <!--\r\n
      // in real bits, urls get returned to our script like this:\r\n
      // res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm \r\n
      \r\n
      \t//For testing use DocURL =
      "res://shdocvw.dll/http_404.htm#ht tps://www.microsoft.c om/bar.htm"\r\n
      \tDocURL=docume nt.URL;\r\n
      \t\r\n
      \t//this is where the http or https will be, as found by searching for
      :// but skipping the res://\r\n
      \tprotocolIndex =DocURL.indexOf ("://",4);\r\n
      \t\r\n
      \t//this finds the ending slash for the domain server \r\n
      \tserverIndex=D ocURL.indexOf("/",protocolI ndex + 3);\r\n
      \r\n
      \t//for the href, we need a valid URL to the domain. We search for the
      # symbol to find the begining \r\n
      \t//of the true URL, and add 1 to skip it - this is the BeginURL
      value. We use serverIndex as the end marker.\r\n
      \t//urlresult=DocUR L.substring(pro tocolIndex - 4,serverIndex); \r\n
      \tBeginURL=DocU RL.indexOf("#", 1) + 1;\r\n
      \turlresult=Doc URL.substring(B eginURL,serverI ndex);\r\n
      \t\t\r\n
      \t//for display, we need to skip after http://, and go to the next
      slash\r\n
      \tdisplayresult =DocURL.substri ng(protocolInde x + 3 ,serverIndex);\ r\n
      \tInsertElement Anchor(urlresul t, displayresult); \r\n
      }\r\n
      \r\n
      function HtmlEncode(text )\r\n
      {\r\n
      return text.replace(/&/g, '&amp').replace (/'/g,
      '&quot;').repla ce(/</g, '&lt;').replace (/>/g, '&gt;');\r\n
      }\r\n
      \r\n
      function TagAttrib(name, value)\r\n
      {\r\n
      return ' '+name+'="'+Htm lEncode(value)+ '"';\r\n
      }\r\n
      \r\n
      function PrintTag(tagNam e, needCloseTag, attrib, inner){\r\n
      document.write( '<' + tagName + attrib + '>' + HtmlEncode(inne r)
      );\r\n
      if (needCloseTag) document.write( '</' + tagName +'>' );\r\n
      }\r\n
      \r\n
      function URI(href)\r\n
      {\r\n
      IEVer = window.navigato r.appVersion;\r \n
      IEVer = IEVer.substr( IEVer.indexOf(' MSIE') + 5, 3 );\r\n
      \r\n
      return (IEVer.charAt(1 )=='.' && IEVer >= '5.5') ?\r\n
      encodeURI(href) :\r\n
      escape(href).re place(/%3A/g, ':').replace(/%3B/g, ';');\r\n
      }\r\n
      \r\n
      function InsertElementAn chor(href, text)\r\n
      {\r\n
      PrintTag('A', true, TagAttrib('HREF ', URI(href)), text);\r\n
      }\r\n
      \r\n
      //-->\r\n
      </script>\r\n
      \r\n
      <body bgcolor="FFFFFF ">\r\n
      \r\n
      <table width="410" cellpadding="3" cellspacing="5" >\r\n
      \r\n
      <tr> \r\n
      <td align="left" valign="middle" width="360">\r\ n
      \t<h1 style="COLOR:00 0000; FONT: 13pt/15pt verdana"><!--Problem-->The
      page cannot be displayed</h1>\r\n
      </td>\r\n
      </tr>\r\n
      \r\n
      <tr>\r\n
      <td width="400" colspan="2">\r\ n
      \t<font style="COLOR:00 0000; FONT: 8pt/11pt verdana">There is a
      problem with the page you are trying to reach and it cannot be
      displayed.</font></td>\r\n
      </tr>\r\n
      \r\n
      <tr>\r\n
      <td width="400" colspan="2">\r\ n
      \t<font style="COLOR:00 0000; FONT: 8pt/11pt verdana">\r\n
      \r\n
      \t<hr color="#C0C0C0" noshade>\r\n
      \t\r\n
      <p>Please try the following:</p>\r\n
      \r\n
      \t<ul>\r\n
      <li id="instruction sText1">Click the \r\n
      <a href="javascrip t:location.relo ad()">\r\n
      Refresh</a> button, or try again later.<br>\r\n
      </li>\r\n
      \t \r\n
      <li>Open the \r\n
      \t \r\n
      \t <script>\r\n
      \t <!--\r\n
      \t if (!((window.navi gator.userAgent .indexOf("MSIE" ) > 0) &&
      (window.navigat or.appVersion.c harAt(0) == "2")))\r\n
      \t {\r\n
      \t \t Homepage();\r\n
      \t }\r\n
      \t //-->\r\n
      \t </script>\r\n
      \r\n
      \t home page, and then look for links to the information you want.
      </li>\r\n
      </ul>\r\n
      \t\r\n
      <h2 style="font:8pt/11pt verdana; color:000000">H TTP 500.100 -
      Internal Server\r\n
      Error - ASP error<br>\r\n
      Internet Information Services</h2>\r\n
      \r\n
      \t<hr color="#C0C0C0" noshade>\r\n
      \t\r\n
      \t<p>Technical Information (for support personnel)</p>\r\n
      \r\n
      <ul>\r\n
      <li>Error Type:<br>\r\n
      <%\r\n
      Dim bakCodepage\r\n
      on error resume next\r\n
      \t bakCodepage = Session.Codepag e\r\n
      \t Session.Codepag e = 1252\r\n
      on error goto 0\r\n
      Response.Write Server.HTMLEnco de(objASPError. Category)\r\n
      If objASPError.ASP Code > "" Then Response.Write Server.HTMLEnco de(",
      " & objASPError.ASP Code)\r\n
      Response.Write Server.HTMLEnco de(" (0x" & Hex(objASPError .Number) &
      ")" ) & "<br>"\r\n
      \r\n
      If objASPError.ASP Description > "" Then \r\n
      \t\tResponse.Wr ite Server.HTMLEnco de(objASPError. ASPDescription) &
      "<br>"\r\n
      \r\n
      elseIf (objASPError.De scription > "") Then \r\n
      \t\t Response.Write Server.HTMLEnco de(objASPError. Description) &
      "<br>" \r\n
      end if\r\n
      \r\n
      \r\n
      \r\n
      blnErrorWritten = False\r\n
      \r\n
      ' Only show the Source if it is available and the request is from
      the same machine as IIS\r\n
      If objASPError.Sou rce > "" Then\r\n
      strServername = LCase(Request.S erverVariables( "SERVER_NAME")) \r\n
      strServerIP = Request.ServerV ariables("LOCAL _ADDR")\r\n
      strRemoteIP = Request.ServerV ariables("REMOT E_ADDR")\r\n
      If (strServername = "localhost" Or strServerIP = strRemoteIP) And
      objASPError.Fil e <> "?" Then\r\n
      Response.Write Server.HTMLEnco de(objASPError. File)\r\n
      If objASPError.Lin e > 0 Then Response.Write ", line " &
      objASPError.Lin e\r\n
      If objASPError.Col umn > 0 Then Response.Write ", column " &
      objASPError.Col umn\r\n
      Response.Write "<br>"\r\n
      Response.Write "<font style=""COLOR:0 00000; FONT: 8pt/11pt
      courier new""><b>"\r\n
      Response.Write Server.HTMLEnco de(objASPError. Source) &
      "<br>"\r\n
      If objASPError.Col umn > 0 Then Response.Write
      String((objASPE rror.Column - 1), "-") & "^<br>"\r\n
      Response.Write "</b></font>"\r\n
      blnErrorWritten = True\r\n
      End If\r\n
      End If\r\n
      \r\n
      If Not blnErrorWritten And objASPError.Fil e <> "?" Then\r\n
      Response.Write "<b>" & Server.HTMLEnco de( objASPError.Fil e)\r\n
      If objASPError.Lin e > 0 Then Response.Write Server.HTMLEnco de(",
      line " & objASPError.Lin e)\r\n
      If objASPError.Col umn > 0 Then Response.Write ", column " &
      objASPError.Col umn\r\n
      Response.Write "</b><br>"\r\n
      End If\r\n
      %>\r\n
      </li>\r\n
      <p>\r\n
      <li>Browser Type:<br>\r\n
      <%= Server.HTMLEnco de(Request.Serv erVariables("HT TP_USER_AGENT") )
      %>\r\n
      </li>\r\n
      <p>\r\n
      <li>Page:<br>\r \n
      <%\r\n
      strMethod = Request.ServerV ariables("REQUE ST_METHOD")\r\n
      \r\n
      Response.Write strMethod & " "\r\n
      \r\n
      If strMethod = "POST" Then\r\n
      Response.Write Request.TotalBy tes & " bytes to "\r\n
      End If\r\n
      \r\n
      Response.Write Request.ServerV ariables("SCRIP T_NAME")\r\n
      \r\n
      lngPos = InStr(Request.Q ueryString, "|")\r\n
      \r\n
      If lngPos > 1 Then\r\n
      Response.Write "?" & Server.HTMLEnco de(Left(Request .QueryString,
      (lngPos - 1)))\r\n
      End If\r\n
      \r\n
      Response.Write "</li>"\r\n
      \r\n
      If strMethod = "POST" Then\r\n
      Response.Write "<p><li>POS T Data:<br>"\r\n
      If Request.TotalBy tes > lngMaxFormBytes Then\r\n
      Response.Write Server.HTMLEnco de(Left(Request .Form,
      lngMaxFormBytes )) & " . . ."\r\n
      Else\r\n
      Response.Write Server.HTMLEnco de(Request.Form )\r\n
      End If\r\n
      Response.Write "</li>"\r\n
      End If\r\n
      \r\n
      %>\r\n
      <p>\r\n
      <li>Time:<br>\r \n
      <%\r\n
      datNow = Now()\r\n
      \r\n
      Response.Write Server.HTMLEnco de(FormatDateTi me(datNow, 1) & ", " &
      FormatDateTime( datNow, 3))\r\n
      on error resume next\r\n
      \t Session.Codepag e = bakCodepage \r\n
      on error goto 0\r\n
      %>\r\n
      </li>\r\n
      </p>\r\n
      <p>\r\n
      <li>More information:<br >\r\n
      <% strQueryString = "prd=iis&sbp=&p ver=5.0&ID=500; 100&cat=" &
      Server.URLEncod e(objASPError.C ategory) & _\r\n
      "&os=&over=&hrd =&Opt1=" & Server.URLEncod e(objASPError.A SPCode) &
      "&Opt2=" & Server.URLEncod e(objASPError.N umber) & _\r\n
      "&Opt3=" & Server.URLEncod e(objASPError.D escription) \r\n
      strURL = "http://www.microsoft.c om/ContentRedirect .asp?" &
      _\r\n
      strQueryString\ r\n
      %>\r\n
      <a href="<%= strURL %[color=blue]
      >">Microsoft Support</a>\r\n[/color]
      </li>\r\n
      </p>\r\n
      \r\n
      </font></td>\r\n
      </tr>\r\n
      \r\n
      </table>\r\n
      </body>\r\n
      </html>\r\n
      WWWConnect::Clo se("localhost", "443")\n
      closed source port: 2065\r\n
      finished.

      =============== ============
      On Fri, 27 Jan 2006 00:12:03 -0800, "David Wang [Msft]"
      <someone@online .microsoft.com> wrote:
      [color=blue]
      >For the page that causes the file download dialog, use WFetch to make the
      >same request and post the raw response.
      >
      >http://www.microsoft.com/downloads/d...displaylang=en
      >
      >If it happens on random pages and not specific pages, then I would not look
      >at Application Mapping (which would be consistent) nor the script in the
      >page (which would be consistent unless the problem is server-specific).
      >
      >Also, can you report the Global and Site ISAPI Filters installed on both
      >machines.
      >
      >My suspicion right now is that some ISAPI Filter is mistakenly adding
      >certain response headers to ASP pages such that the browser asks to download
      >the page instead of displaying it.[/color]

      Comment

      • David Wang [Msft]

        #4
        Re: Opening ASP page causes file download dialog instead

        /onlineservices/grantapp/final.asp is being treated as a static file and
        downloaded verbatim (<% %> is still there) instead of as a dynamic ASP file
        that is executed to generate a HTML response.

        Assuming no ISAPI Filter, this means either:
        1. .asp does not exist as an Application Mapping for this URL resource
        2. Execute permission is "None" for this URL resource

        --
        //David
        IIS

        This posting is provided "AS IS" with no warranties, and confers no rights.
        //

        "Neil Rossi" <rossi@kdvsyste ms.com> wrote in message
        news:ltpkt11cck bp32afhd2h7smjc 6r6lsuefm@4ax.c om...[color=blue]
        > Thanks for your response, David. There are, as far as I can see, no
        > ISAPI filters defined within INetMgr, either for this specific website
        > or at the Default website level.
        >
        > Just for the heck of it, I logged in to the remote server and ran the
        > app throwing the error using localhost. Now I see that the page
        > showing the download dialog on a remote client, is actually displaying
        > a "500 Internal Server Error" when logged in to the IIS server.
        >
        > Here's the log output from WFetch run on the server Win2kDev1. I am
        > trying to load the page final.asp, so this error page doesn't seem to
        > give me much info.
        > ------------------------------
        > started....
        > WWWConnect::Con nect("localhost ","443")\n
        > source port: 2065\r\n
        > REQUEST: **************\ n
        > GET /onlineservices/grantapp/final.asp HTTP/1.1\r\n
        > Host: localhost\r\n
        > Accept: */*\r\n
        > \r\n
        > RESPONSE: **************\ n
        > HTTP/1.1 200 OK\r\n
        > Server: Microsoft-IIS/5.0\r\n
        > Date: Fri, 27 Jan 2006 18:30:47 GMT\r\n
        > Connection: close\r\n
        > Content-Type: application/octet-stream\r\n
        > Cache-control: private\r\n
        > Content-Length: 7860\r\n
        > \r\n
        > <%@ language="VBScr ipt" %>\r\n
        > <%\r\n
        > Option Explicit\r\n
        > \r\n
        > Const lngMaxFormBytes = 200\r\n
        > \r\n
        > Dim objASPError, blnErrorWritten , strServername, strServerIP,
        > strRemoteIP\r\n
        > Dim strMethod, lngPos, datNow, strQueryString, strURL\r\n
        > \r\n
        > If Response.Buffer Then\r\n
        > Response.Clear\ r\n
        > Response.Status = "500 Internal Server Error"\r\n
        > Response.Conten tType = "text/html"\r\n
        > Response.Expire s = 0\r\n
        > End If\r\n
        > \r\n
        > Set objASPError = Server.GetLastE rror\r\n
        > %>\r\n
        > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\r\n
        > \r\n
        > <html dir=ltr>\r\n
        > \r\n
        > <head>\r\n
        > <style>\r\n
        > a:link\t\t\t{fo nt:8pt/11pt verdana; color:FF0000}\r \n
        > a:visited\t\t{f ont:8pt/11pt verdana; color:#4e4e4e}\ r\n
        > </style>\r\n
        > \r\n
        > <META NAME="ROBOTS" CONTENT="NOINDE X">\r\n
        > \r\n
        > <title>The page cannot be displayed</title>\r\n
        > \r\n
        > <META HTTP-EQUIV="Content-Type" Content="text-html;
        > charset=Windows-1252">\r\n
        > </head>\r\n
        > \r\n
        > <script> \r\n
        > function Homepage(){\r\n
        > <!--\r\n
        > // in real bits, urls get returned to our script like this:\r\n
        > // res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm \r\n
        > \r\n
        > \t//For testing use DocURL =
        > "res://shdocvw.dll/http_404.htm#ht tps://www.microsoft.c om/bar.htm"\r\n
        > \tDocURL=docume nt.URL;\r\n
        > \t\r\n
        > \t//this is where the http or https will be, as found by searching for
        > :// but skipping the res://\r\n
        > \tprotocolIndex =DocURL.indexOf ("://",4);\r\n
        > \t\r\n
        > \t//this finds the ending slash for the domain server \r\n
        > \tserverIndex=D ocURL.indexOf("/",protocolI ndex + 3);\r\n
        > \r\n
        > \t//for the href, we need a valid URL to the domain. We search for the
        > # symbol to find the begining \r\n
        > \t//of the true URL, and add 1 to skip it - this is the BeginURL
        > value. We use serverIndex as the end marker.\r\n
        > \t//urlresult=DocUR L.substring(pro tocolIndex - 4,serverIndex); \r\n
        > \tBeginURL=DocU RL.indexOf("#", 1) + 1;\r\n
        > \turlresult=Doc URL.substring(B eginURL,serverI ndex);\r\n
        > \t\t\r\n
        > \t//for display, we need to skip after http://, and go to the next
        > slash\r\n
        > \tdisplayresult =DocURL.substri ng(protocolInde x + 3 ,serverIndex);\ r\n
        > \tInsertElement Anchor(urlresul t, displayresult); \r\n
        > }\r\n
        > \r\n
        > function HtmlEncode(text )\r\n
        > {\r\n
        > return text.replace(/&/g, '&amp').replace (/'/g,
        > '&quot;').repla ce(/</g, '&lt;').replace (/>/g, '&gt;');\r\n
        > }\r\n
        > \r\n
        > function TagAttrib(name, value)\r\n
        > {\r\n
        > return ' '+name+'="'+Htm lEncode(value)+ '"';\r\n
        > }\r\n
        > \r\n
        > function PrintTag(tagNam e, needCloseTag, attrib, inner){\r\n
        > document.write( '<' + tagName + attrib + '>' + HtmlEncode(inne r)
        > );\r\n
        > if (needCloseTag) document.write( '</' + tagName +'>' );\r\n
        > }\r\n
        > \r\n
        > function URI(href)\r\n
        > {\r\n
        > IEVer = window.navigato r.appVersion;\r \n
        > IEVer = IEVer.substr( IEVer.indexOf(' MSIE') + 5, 3 );\r\n
        > \r\n
        > return (IEVer.charAt(1 )=='.' && IEVer >= '5.5') ?\r\n
        > encodeURI(href) :\r\n
        > escape(href).re place(/%3A/g, ':').replace(/%3B/g, ';');\r\n
        > }\r\n
        > \r\n
        > function InsertElementAn chor(href, text)\r\n
        > {\r\n
        > PrintTag('A', true, TagAttrib('HREF ', URI(href)), text);\r\n
        > }\r\n
        > \r\n
        > //-->\r\n
        > </script>\r\n
        > \r\n
        > <body bgcolor="FFFFFF ">\r\n
        > \r\n
        > <table width="410" cellpadding="3" cellspacing="5" >\r\n
        > \r\n
        > <tr> \r\n
        > <td align="left" valign="middle" width="360">\r\ n
        > \t<h1 style="COLOR:00 0000; FONT: 13pt/15pt verdana"><!--Problem-->The
        > page cannot be displayed</h1>\r\n
        > </td>\r\n
        > </tr>\r\n
        > \r\n
        > <tr>\r\n
        > <td width="400" colspan="2">\r\ n
        > \t<font style="COLOR:00 0000; FONT: 8pt/11pt verdana">There is a
        > problem with the page you are trying to reach and it cannot be
        > displayed.</font></td>\r\n
        > </tr>\r\n
        > \r\n
        > <tr>\r\n
        > <td width="400" colspan="2">\r\ n
        > \t<font style="COLOR:00 0000; FONT: 8pt/11pt verdana">\r\n
        > \r\n
        > \t<hr color="#C0C0C0" noshade>\r\n
        > \t\r\n
        > <p>Please try the following:</p>\r\n
        > \r\n
        > \t<ul>\r\n
        > <li id="instruction sText1">Click the \r\n
        > <a href="javascrip t:location.relo ad()">\r\n
        > Refresh</a> button, or try again later.<br>\r\n
        > </li>\r\n
        > \t \r\n
        > <li>Open the \r\n
        > \t \r\n
        > \t <script>\r\n
        > \t <!--\r\n
        > \t if (!((window.navi gator.userAgent .indexOf("MSIE" ) > 0) &&
        > (window.navigat or.appVersion.c harAt(0) == "2")))\r\n
        > \t {\r\n
        > \t \t Homepage();\r\n
        > \t }\r\n
        > \t //-->\r\n
        > \t </script>\r\n
        > \r\n
        > \t home page, and then look for links to the information you want.
        > </li>\r\n
        > </ul>\r\n
        > \t\r\n
        > <h2 style="font:8pt/11pt verdana; color:000000">H TTP 500.100 -
        > Internal Server\r\n
        > Error - ASP error<br>\r\n
        > Internet Information Services</h2>\r\n
        > \r\n
        > \t<hr color="#C0C0C0" noshade>\r\n
        > \t\r\n
        > \t<p>Technical Information (for support personnel)</p>\r\n
        > \r\n
        > <ul>\r\n
        > <li>Error Type:<br>\r\n
        > <%\r\n
        > Dim bakCodepage\r\n
        > on error resume next\r\n
        > \t bakCodepage = Session.Codepag e\r\n
        > \t Session.Codepag e = 1252\r\n
        > on error goto 0\r\n
        > Response.Write Server.HTMLEnco de(objASPError. Category)\r\n
        > If objASPError.ASP Code > "" Then Response.Write Server.HTMLEnco de(",
        > " & objASPError.ASP Code)\r\n
        > Response.Write Server.HTMLEnco de(" (0x" & Hex(objASPError .Number) &
        > ")" ) & "<br>"\r\n
        > \r\n
        > If objASPError.ASP Description > "" Then \r\n
        > \t\tResponse.Wr ite Server.HTMLEnco de(objASPError. ASPDescription) &
        > "<br>"\r\n
        > \r\n
        > elseIf (objASPError.De scription > "") Then \r\n
        > \t\t Response.Write Server.HTMLEnco de(objASPError. Description) &
        > "<br>" \r\n
        > end if\r\n
        > \r\n
        > \r\n
        > \r\n
        > blnErrorWritten = False\r\n
        > \r\n
        > ' Only show the Source if it is available and the request is from
        > the same machine as IIS\r\n
        > If objASPError.Sou rce > "" Then\r\n
        > strServername = LCase(Request.S erverVariables( "SERVER_NAME")) \r\n
        > strServerIP = Request.ServerV ariables("LOCAL _ADDR")\r\n
        > strRemoteIP = Request.ServerV ariables("REMOT E_ADDR")\r\n
        > If (strServername = "localhost" Or strServerIP = strRemoteIP) And
        > objASPError.Fil e <> "?" Then\r\n
        > Response.Write Server.HTMLEnco de(objASPError. File)\r\n
        > If objASPError.Lin e > 0 Then Response.Write ", line " &
        > objASPError.Lin e\r\n
        > If objASPError.Col umn > 0 Then Response.Write ", column " &
        > objASPError.Col umn\r\n
        > Response.Write "<br>"\r\n
        > Response.Write "<font style=""COLOR:0 00000; FONT: 8pt/11pt
        > courier new""><b>"\r\n
        > Response.Write Server.HTMLEnco de(objASPError. Source) &
        > "<br>"\r\n
        > If objASPError.Col umn > 0 Then Response.Write
        > String((objASPE rror.Column - 1), "-") & "^<br>"\r\n
        > Response.Write "</b></font>"\r\n
        > blnErrorWritten = True\r\n
        > End If\r\n
        > End If\r\n
        > \r\n
        > If Not blnErrorWritten And objASPError.Fil e <> "?" Then\r\n
        > Response.Write "<b>" & Server.HTMLEnco de( objASPError.Fil e)\r\n
        > If objASPError.Lin e > 0 Then Response.Write Server.HTMLEnco de(",
        > line " & objASPError.Lin e)\r\n
        > If objASPError.Col umn > 0 Then Response.Write ", column " &
        > objASPError.Col umn\r\n
        > Response.Write "</b><br>"\r\n
        > End If\r\n
        > %>\r\n
        > </li>\r\n
        > <p>\r\n
        > <li>Browser Type:<br>\r\n
        > <%= Server.HTMLEnco de(Request.Serv erVariables("HT TP_USER_AGENT") )
        > %>\r\n
        > </li>\r\n
        > <p>\r\n
        > <li>Page:<br>\r \n
        > <%\r\n
        > strMethod = Request.ServerV ariables("REQUE ST_METHOD")\r\n
        > \r\n
        > Response.Write strMethod & " "\r\n
        > \r\n
        > If strMethod = "POST" Then\r\n
        > Response.Write Request.TotalBy tes & " bytes to "\r\n
        > End If\r\n
        > \r\n
        > Response.Write Request.ServerV ariables("SCRIP T_NAME")\r\n
        > \r\n
        > lngPos = InStr(Request.Q ueryString, "|")\r\n
        > \r\n
        > If lngPos > 1 Then\r\n
        > Response.Write "?" & Server.HTMLEnco de(Left(Request .QueryString,
        > (lngPos - 1)))\r\n
        > End If\r\n
        > \r\n
        > Response.Write "</li>"\r\n
        > \r\n
        > If strMethod = "POST" Then\r\n
        > Response.Write "<p><li>POS T Data:<br>"\r\n
        > If Request.TotalBy tes > lngMaxFormBytes Then\r\n
        > Response.Write Server.HTMLEnco de(Left(Request .Form,
        > lngMaxFormBytes )) & " . . ."\r\n
        > Else\r\n
        > Response.Write Server.HTMLEnco de(Request.Form )\r\n
        > End If\r\n
        > Response.Write "</li>"\r\n
        > End If\r\n
        > \r\n
        > %>\r\n
        > <p>\r\n
        > <li>Time:<br>\r \n
        > <%\r\n
        > datNow = Now()\r\n
        > \r\n
        > Response.Write Server.HTMLEnco de(FormatDateTi me(datNow, 1) & ", " &
        > FormatDateTime( datNow, 3))\r\n
        > on error resume next\r\n
        > \t Session.Codepag e = bakCodepage \r\n
        > on error goto 0\r\n
        > %>\r\n
        > </li>\r\n
        > </p>\r\n
        > <p>\r\n
        > <li>More information:<br >\r\n
        > <% strQueryString = "prd=iis&sbp=&p ver=5.0&ID=500; 100&cat=" &
        > Server.URLEncod e(objASPError.C ategory) & _\r\n
        > "&os=&over=&hrd =&Opt1=" & Server.URLEncod e(objASPError.A SPCode) &
        > "&Opt2=" & Server.URLEncod e(objASPError.N umber) & _\r\n
        > "&Opt3=" & Server.URLEncod e(objASPError.D escription) \r\n
        > strURL = "http://www.microsoft.c om/ContentRedirect .asp?" &
        > _\r\n
        > strQueryString\ r\n
        > %>\r\n
        > <a href="<%= strURL %[color=green]
        >>">Microsoft Support</a>\r\n[/color]
        > </li>\r\n
        > </p>\r\n
        > \r\n
        > </font></td>\r\n
        > </tr>\r\n
        > \r\n
        > </table>\r\n
        > </body>\r\n
        > </html>\r\n
        > WWWConnect::Clo se("localhost", "443")\n
        > closed source port: 2065\r\n
        > finished.
        >
        > =============== ============
        > On Fri, 27 Jan 2006 00:12:03 -0800, "David Wang [Msft]"
        > <someone@online .microsoft.com> wrote:
        >[color=green]
        >>For the page that causes the file download dialog, use WFetch to make the
        >>same request and post the raw response.
        >>
        >>http://www.microsoft.com/downloads/d...displaylang=en
        >>
        >>If it happens on random pages and not specific pages, then I would not
        >>look
        >>at Application Mapping (which would be consistent) nor the script in the
        >>page (which would be consistent unless the problem is server-specific).
        >>
        >>Also, can you report the Global and Site ISAPI Filters installed on both
        >>machines.
        >>
        >>My suspicion right now is that some ISAPI Filter is mistakenly adding
        >>certain response headers to ASP pages such that the browser asks to
        >>download
        >>the page instead of displaying it.[/color][/color]


        Comment

        • Neil Rossi

          #5
          Re: Opening ASP page causes file download dialog instead

          Thank you, David. I just checked, and Execute permissions for the
          default web site as well as Online Services (the misbehaving site)
          virtual directory is set to Scripts Only.

          ..asp is an application mapping for both the Default Web site as well
          as Online Services. I just checked Beta1 and it was configured
          exactly the same as on the Win2kDev1 server. I am running out of
          things to check. It is as if the application mapping was being
          ignored for _specific_ files within the site. Am I correct in
          assuming that the mapping is determined only by the file extension
          (.asp) and not the content of the file?

          On Wed, 1 Feb 2006 01:46:37 -0800, "David Wang [Msft]"
          <someone@online .microsoft.com> wrote:
          [color=blue]
          >/onlineservices/grantapp/final.asp is being treated as a static file and
          >downloaded verbatim (<% %> is still there) instead of as a dynamic ASP file
          >that is executed to generate a HTML response.
          >
          >Assuming no ISAPI Filter, this means either:
          >1. .asp does not exist as an Application Mapping for this URL resource
          >2. Execute permission is "None" for this URL resource[/color]

          Comment

          • Neil Rossi

            #6
            Re: Opening ASP page causes file download dialog instead

            Here's the solution. It required a paid support call to MS, but maybe
            this will save somebody else some aggravation.

            There were actually two problems. First, the custom error defined for
            error 500;100 (internal server error; ASP error) in
            C:\WINNT\help\i isHelp\common seems to have become corrupted. It was
            not being recognized as a valid HTML or ASP page, and so prompted a
            download dialog on the client (it displayed the source text if it was
            run on Win2kDev1 under localhost).

            *That* error was being caused by an out-of-date ASP include file which
            was loading a dictionary object of loan types. We never saw that
            error because it was being masked by the corrupted custom error page,
            which displayed as a text file. The MS support person suggested
            working around the bad error page by clicking “Set to default” in
            InetMgr when you highlight the 500;100 error page. Once that was
            done, the bad include file was immediately apparent and was a simple
            fix.

            But we still wasted several man-days trying to track it down! All
            errors are simple once you figure them out.



            On Thu, 02 Feb 2006 09:11:56 -0500, Neil Rossi <rossi@kdvsyste ms.com>
            wrote:
            [color=blue]
            >Thank you, David. I just checked, and Execute permissions for the
            >default web site as well as Online Services (the misbehaving site)
            >virtual directory is set to Scripts Only.
            >
            >.asp is an application mapping for both the Default Web site as well
            >as Online Services. I just checked Beta1 and it was configured
            >exactly the same as on the Win2kDev1 server. I am running out of
            >things to check. It is as if the application mapping was being
            >ignored for _specific_ files within the site. Am I correct in
            >assuming that the mapping is determined only by the file extension
            >(.asp) and not the content of the file?
            >
            >On Wed, 1 Feb 2006 01:46:37 -0800, "David Wang [Msft]"
            ><someone@onlin e.microsoft.com > wrote:
            >[color=green]
            >>/onlineservices/grantapp/final.asp is being treated as a static file and
            >>downloaded verbatim (<% %> is still there) instead of as a dynamic ASP file
            >>that is executed to generate a HTML response.
            >>
            >>Assuming no ISAPI Filter, this means either:
            >>1. .asp does not exist as an Application Mapping for this URL resource
            >>2. Execute permission is "None" for this URL resource[/color][/color]

            Comment

            Working...