Search code examples
.netasp.net-mvc-2azureasp.net-mvc-routingazure-web-roles

Bad Request - Invalid URL


I am having below mentioned issue when I am running Asp.Net MVC 2 project on windows Azure emulator (dev environment)

enter image description here

My web.config files is as below :

<httpRuntime maxUrlLength="4096" relaxedUrlToFileSystemMapping="true" maxQueryStringLength = "4096" requestValidationMode="4.0" />

My URL with query string is as below :

http://www.pawloyalty.com:82/booking/camp-canine-doggy-daycare-and-boarding/cgillette/key/camp-canine-doggy-daycare-and-boarding-cgillette-20130103154022/pets/bailey/service/full-day-care/dates/2013-1-3%2b2013-1-4%2b2013-1-7%2b2013-1-8%2b2013-1-9%2b2013-1-10%2b2013-1-11%2b2013-1-14%2b2013-1-15%2b2013-1-16%2b2013-1-17%2b2013-1-18%2b2013-1-21%2b2013-1-22%2b2013-1-23%2b2013-1-24%2b2013-1-25%2b2013-1-28%2b2013-1-29%2b2013-1-30%2b2013-1-31%2b2013-2-1%2b2013-2-4%2b2013-2-5%2b2013-2-6%2b2013-2-7%2b2013-2-8%2b2013-2-11%2b2013-2-12%2b2013-2-13%2b2013-2-14%2b2013-2-15%2b2013-2-18%2b2013-2-19%2b2013-2-20%2b2013-2-21%2b2013-2-22%2b2013-2-25%2b2013-2-26%2b2013-2-27%2b2013-2-28%2b2013-3-1%2b2013-3-4%2b2013-3-5%2b2013-3-6%2b2013-3-7%2b2013-3-8%2b2013-3-12%2b2013-3-13%2b2013-3-14%2b2013-3-15%2b2013-3-18%2b2013-3-19%2b2013-3-20%2b2013-3-21%2b2013-3-22%2b2013-3-25%2b2013-3-26%2b2013-3-27%2b2013-3-28%2b2013-3-29/rtimes/7.5%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19%2b6%2b19/rextras-bailey/-?step=dates

Note : above having 1490 characters

My controller Action method's redirect is as below :

return RedirectToRoute("booking", new { action = "index", providerKey = providerKey, ownerKey = ownerKey, arguments = arguments, step = step });

Note : arguments having above query string details

How to get rid of this error page ?


Solution

  • keep your URL length under 2000 characters or use POST method rather than GET