• <tfoot id='EojSP'></tfoot>
      <bdo id='EojSP'></bdo><ul id='EojSP'></ul>

  • <small id='EojSP'></small><noframes id='EojSP'>

        <i id='EojSP'><tr id='EojSP'><dt id='EojSP'><q id='EojSP'><span id='EojSP'><b id='EojSP'><form id='EojSP'><ins id='EojSP'></ins><ul id='EojSP'></ul><sub id='EojSP'></sub></form><legend id='EojSP'></legend><bdo id='EojSP'><pre id='EojSP'><center id='EojSP'></center></pre></bdo></b><th id='EojSP'></th></span></q></dt></tr></i><div id='EojSP'><tfoot id='EojSP'></tfoot><dl id='EojSP'><fieldset id='EojSP'></fieldset></dl></div>
        <legend id='EojSP'><style id='EojSP'><dir id='EojSP'><q id='EojSP'></q></dir></style></legend>

        如何使用 .Net 处理程序处理 .asp 扩展?

        How do I process .asp extensions using the .Net handler?(如何使用 .Net 处理程序处理 .asp 扩展?)
          <tbody id='en3jj'></tbody>
      1. <tfoot id='en3jj'></tfoot><legend id='en3jj'><style id='en3jj'><dir id='en3jj'><q id='en3jj'></q></dir></style></legend>

              1. <small id='en3jj'></small><noframes id='en3jj'>

                • <bdo id='en3jj'></bdo><ul id='en3jj'></ul>
                • <i id='en3jj'><tr id='en3jj'><dt id='en3jj'><q id='en3jj'><span id='en3jj'><b id='en3jj'><form id='en3jj'><ins id='en3jj'></ins><ul id='en3jj'></ul><sub id='en3jj'></sub></form><legend id='en3jj'></legend><bdo id='en3jj'><pre id='en3jj'><center id='en3jj'></center></pre></bdo></b><th id='en3jj'></th></span></q></dt></tr></i><div id='en3jj'><tfoot id='en3jj'></tfoot><dl id='en3jj'><fieldset id='en3jj'></fieldset></dl></div>
                  本文介绍了如何使用 .Net 处理程序处理 .asp 扩展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个旧的经典 ASP 网站,我正在迁移到 IIS7.5.我不想在服务器上安装经典的 ASP,所以我只想将 .asp 文件视为 .aspx 文件.

                  I have an older classic ASP website that I am migrating over to IIS7.5. I don't feel like installing classic ASP on the server, and so I just want the .asp files to be treated as if they were .aspx files.

                  如何在 IIS7.5 中执行此操作?

                  How do I go about doing this in IIS7.5?

                  澄清一下,我不是在问如何让经典的 ASP 代码在 .Net 下工作.我只是在问如何映射要由 .net 运行时处理的 .ASP 文件扩展名.我会将 .asp 文件中的代码升级为 .net.

                  To clarify, I am NOT asking how to get classic ASP code to work under .Net. I am just asking how to map the .ASP file extension to be handled by the .net runtime. I will upgrade the code in the .asp files to .net.

                  我放弃并最终安装了经典 ASP,因为我无法使映射工作(收到 404.17 和 404.3 错误的组合).我将 David Lively 的答案标记为正确,因为它是最详细和最有帮助的.

                  I gave up and ended up installing classic ASP, as I couldn't get the mapping to work (received a combination of 404.17 and 404.3 errors). I marked David Lively's answer as correct as it was the most detailed and helpful.

                  推荐答案

                  这行不通.处理执行 ASP.NET 应用程序的 Aspnet_isapi.DLL 不理解经典 ASP,并将尝试将经典 VBScript 代码解析为 .NET VBScript.

                  That's not going to work. Aspnet_isapi.DLL, which handles executing ASP.NET applications, doesn't understand classic ASP, and will try to parse the classic VBScript code as .NET VBScript.

                  唯一可行的方法是,如果您的 .ASP 页面中没有(我的意思是绝对没有)经典 ASP 代码.

                  The only way this is feasible is if you have no (and I mean ABSOLUTELY NONE) classic ASP code in your .ASP pages.

                  如果是这样,您可以将 .ASP 扩展名映射到 IIS 管理器中的 aspnet_isapi.

                  If that is the case, you can map the .ASP extension to aspnet_isapi in IIS manager.

                  1. 打开inetmgr.
                  2. 选择网站
                  3. 在功能视图"面板中,选择处理程序映射"
                  4. 将 .ASP 的映射添加到 C:Windowsmicrosoft.netframeworkv2.0.50727aspnet_isapi.dll(假设您使用的是 ASP.NET 2.x).
                  1. Open inetmgr.
                  2. Select the website
                  3. In the Feature View panel, select "Handler Mappings"
                  4. Add a mapping for .ASP to C:Windowsmicrosoft.netframeworkv2.0.50727aspnet_isapi.dll (assuming you're using ASP.NET 2.x).

                  同样,如果您的 .asp 页面中有任何代码,这将导致每个 .ASP 页面出现光彩夺目的技术色彩失败.

                  Again, if you have any code in your .asp pages, this will cause a glorious, technicolor failure for every .ASP page.

                  另一种选择是使用重写引擎(我们使用 ISAPI Rewrite)来更改文件从 .asp 到 .aspx 的传入请求的扩展.

                  Another option is to use a rewrite engine (we use ISAPI Rewrite) to change the file extension of incoming requests from from .asp to .aspx.

                  您为什么不想在服务器上安装经典的 ASP?它可以与 ASP.NET 并行工作.

                  Why don't you want to install classic ASP on the server? It works just fine in parallel with ASP.NET.

                  编辑

                  它实际上被称为处理程序映射".见上图.

                  It's actually called "handler mappings." See image above.

                  这篇关于如何使用 .Net 处理程序处理 .asp 扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Problem getting list box items added through jquery in code behind(在后面的代码中通过 jquery 添加列表框项目时出现问题)
                  Selected item in list box is null(列表框中的选定项为空)
                  ASP.NET: Listbox datasource and databind(ASP.NET:列表框数据源和数据绑定)
                  ASP:ListBox Get Selected Items - One Liner?(ASP:ListBox 获取选定的项目 - 一个衬里?)
                  Maintain scroll position in listboxes in updatepanels, NOT the page(在更新面板的列表框中保持滚动位置,而不是页面)
                  Moving items in Dual Listboxes(在双列表框中移动项目)
                    <tbody id='DxzlS'></tbody>
                  <tfoot id='DxzlS'></tfoot>

                  • <i id='DxzlS'><tr id='DxzlS'><dt id='DxzlS'><q id='DxzlS'><span id='DxzlS'><b id='DxzlS'><form id='DxzlS'><ins id='DxzlS'></ins><ul id='DxzlS'></ul><sub id='DxzlS'></sub></form><legend id='DxzlS'></legend><bdo id='DxzlS'><pre id='DxzlS'><center id='DxzlS'></center></pre></bdo></b><th id='DxzlS'></th></span></q></dt></tr></i><div id='DxzlS'><tfoot id='DxzlS'></tfoot><dl id='DxzlS'><fieldset id='DxzlS'></fieldset></dl></div>
                    • <small id='DxzlS'></small><noframes id='DxzlS'>

                      <legend id='DxzlS'><style id='DxzlS'><dir id='DxzlS'><q id='DxzlS'></q></dir></style></legend>

                        <bdo id='DxzlS'></bdo><ul id='DxzlS'></ul>