ASP.Net:尝试处理 http://localhost:5957/http://yahoo.com 时出现 HTTP 400 错误请求错误 [英] ASP.Net: HTTP 400 Bad Request error when trying to process http://localhost:5957/http://yahoo.com
问题描述
我正在尝试创建类似于 diggbar 的东西.
I'm trying to create something similar to the diggbar.
我使用的是 Visual Studio 2010 和 Asp 开发服务器.
I'm using Visual Studio 2010 and Asp Development server.
但是,我无法让 ASP 开发服务器处理该请求,因为它在路径中包含http:".我尝试创建一个 HTTPModule 来重写 BeginRequest 中的 URL,但是当 url 为 http://localhost:5957/http://yahoo.com.如果 url 是 http://localhost:5957/http/yahoo.com<,则事件处理程序会被调用/a>
However, I can't get the ASP dev server to handle the request because it contains "http:" in the path. I've tried to create an HTTPModule to rewrite the URL in the BeginRequest , but the event handler doesn't get called when the url is http://localhost:5957/http://yahoo.com. The event handler does get called if the url is http://localhost:5957/http/yahoo.com
总结:
- http://localhost:5957/http/yahoo.com 有效
- http://localhost:5957/http//yahoo.com 没有工作
- http://localhost:5957/http://yahoo.com不起作用
- http://localhost:5957/http://yahoo.com 没有工作
- http://localhost:5957/http/yahoo.com works
- http://localhost:5957/http//yahoo.com does not work
- http://localhost:5957/http://yahoo.com does not work
- http://localhost:5957/http:/yahoo.com does not work
有什么想法吗?
推荐答案
我在 Stefan 的帮助下写了一篇文章,解释了如何做到这一点:
I've written an article with Stefan's help that explains how to do this:
古怪实验:在 ASPNET 中允许百分比、尖括号和其他顽皮的东西./IIS 请求 URL
这篇关于ASP.Net:尝试处理 http://localhost:5957/http://yahoo.com 时出现 HTTP 400 错误请求错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!