ASP.Net:HTTP试图处理HTTP时,400错误请求错误://本地主机:5957 / HTTP://yahoo.com

编程入门 行业动态 更新时间:2024-10-22 18:29:21
本文介绍了ASP.Net:HTTP试图处理HTTP时,400错误请求错误://本地主机:5957 / HTTP://yahoo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图创建一个类似于diggbar东西: digg/ cnn

I'm trying to create something similar to the diggbar : digg/cnn

我使用Visual Studio 2010和ASP开发服务器。

I'm using Visual Studio 2010 and Asp Development server.

不过,我不能让ASP开发服务器,因为它包含处理请求的http:路径。我试图创建一个HttpModule改写了的BeginRequest的网址,但该事件处理程序不会被调用当网址的 HTTP://本地主机:5957 / HTTP://yahoo 。该事件处理函数被调用如果URL 的http://本地主机:5957 / HTTP / yahoo

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 localhost:5957/yahoo. The event handler does get called if the url is localhost:5957/http/yahoo

要总结

  • 的http://本地主机:5957 / HTTP / yahoo 作品
  • 的http://本地主机:5957 / HTTP // yahoo 不起作用
  • 的http://本地主机:5957 / HTTP://yahoo 呢不行
  • 的http://本地主机:5957 / HTTP:/yahoo 不起作用
  • localhost:5957/http/yahoo works
  • localhost:5957/http//yahoo does not work
  • localhost:5957/yahoo does not work
  • localhost:5957/http:/yahoo does not work

任何想法?

推荐答案

我已经写了斯特凡的帮助下一篇文章,解释如何做到这一点:

I've written an article with Stefan's help that explains how to do this:

Experiments在的古怪:允许百分比,尖括号,并在ASP.NET/IIS请求网址其他顽皮的事情

更多推荐

ASP.Net:HTTP试图处理HTTP时,400错误请求错误://本地主机:5957 / HTTP://yahoo.com

本文发布于:2023-11-16 11:15:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1603783.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   主机   HTTP   Net   ASP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!