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 页面
基础教程推荐
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
