WebForms page inside of Orchard CMS Application(Orchard CMS 应用程序内的 WebForms 页面)
问题描述
我正在尝试在 Orchard 1.2 应用程序中包含一个网络表单 (.aspx) 页面.
I'm trying to include a webforms (.aspx) page inside of an Orchard 1.2 application.
我尝试在 web.config 中添加回 aspx 处理程序
I've tried adding back the aspx handler in the web.config
<add path="*.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" />
并将代码添加到 Global.asax 以尝试获取路由以忽略 aspx 请求
and added code to the Global.asax to try and get routing to ignore aspx requests
routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
每当我请求 aspx 页面时,我仍然会收到 404 响应.我该如何完成这项工作?
I'm still receiving a 404 response anytime I request the aspx page. How do I make this work?
推荐答案
这是一个对我有用的 web.config:
Here's a web.config that has worked for me:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers accessPolicy="Script">
<add name="ASPX" path="*.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode" requireAccess="Script"/>
</handlers>
</system.webServer>
</configuration>
这篇关于Orchard CMS 应用程序内的 WebForms 页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Orchard CMS 应用程序内的 WebForms 页面
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- 输入按键事件处理程序 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
