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

后端 未结 12 2452
小鲜肉
小鲜肉 2020-12-21 02:04

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

12条回答
  •  没有蜡笔的小新
    2020-12-21 02:55

    From Stefan on the ASP.Net team: http://forums.asp.net/p/1431148/3221542.aspx

    In current versions of ASP.NET Urls containing characters like the colon character will be rejected as a potential security threat. The historical reason for this is that the underlying NTFS file system supports alternate resource streams that can be accessed with names like "yourfile.txt:hiddendata.txt". Blocking the colon character from Urls prevents poorly written applications from accidentally working with alternate resource streams.

    There is also a limitation in current versions of ASP.NET that incoming Urls need to map to the NTFS file system for purposes of determining managed configuration data.

    In ASP.NET 4 these limitations can be optionally removed. However these changes are in the Beta 2 version of ASP.NET 4 - they are not in Beta 1. We tried out the Url listed earlier in this forum post and confirmed that with our internal builds of ASP.NET 4 you can use that style of Url and process it without any 400 error.

    -Stefan

提交回复
热议问题