简体   繁体   中英

Get the exact raw URL in IIS 7.0 integrated mode ASP.NET 4.0

After some changes in web.config now IIS allows characters like ":" in URL but it makes some modifications. For example:

http://localhost/a///b => http://localhost/a/b (remove all slashes but one)
http://localhost/a\b => http://localhost/a/b (changes backslash with slash)
...

I want URL string from within a HttpHandler (I use Request.RawUrl ) as it is without any change.

I think the browser is making those changes, not the server. Test it by sending raw request from within code, using AJAX or something like that and see what you get on the server side.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM