Rewrite Path in Asp.Net MVC Project
2024-08-27 10:34:12
// Change the current path so that the Routing handler can correctly interpret
// the request, then restore the original path so that the OutputCache module
// can correctly process the response (if caching is enabled).
string originalPath = Request.Path;
HttpContext.Current.RewritePath(Request.ApplicationPath, false);
IHttpHandler httpHandler = new MvcHttpHandler();
httpHandler.ProcessRequest(HttpContext.Current);
HttpContext.Current.RewritePath(originalPath, false);
最新文章
- 《连载 | 物联网框架ServerSuperIO教程》-4.如开发一套设备驱动,同时支持串口和网络通讯。附:将来支持Windows 10 IOT
- windows常用快捷键
- Win7 关闭Window update
- Rescue
- (八)C语言结构体和指针
- Linux重复执行上条命令
- 使用UDP进行数据发送的实例一
- CentOS 命令随笔
- 从零开始搭建框架SSM+Redis+Mysql(二)之MAVEN项目搭建
- Java Web 单表操作
- 阿里云 ECS centos java timer进程异常/混乱......的解决方法
- poj 2356 (抽屉原理)
- RabbitMQ在java中基础使用
- Mysql 复制一个新表
- rexec/rlogin/rsh介绍
- Android SDK版本号与API Level 的对应关系-转
- Java常用加密方案及实现——AES和DES
- PMP学习笔记
- vue入门教程
- CodeForces 1063C. Dwarves, Hats and Extrasensory Abilities 交互