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 页面
基础教程推荐
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 将数据集转换为列表 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- 如果条件可以为空 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
