Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.Net: HTTP 400 Bad Request error when trying to process http://localhost:5957/http://yahoo.com

I'm trying to create something similar to the diggbar.

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

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

To summarize:

  • 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

Any ideas?

like image 400
mat3 Avatar asked Nov 27 '22 15:11

mat3


1 Answers

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

Experiments in Wackiness: Allowing percents, angle-brackets, and other naughty things in the ASP.NET/IIS Request URL

like image 98
Scott Hanselman Avatar answered Dec 05 '22 00:12

Scott Hanselman