I asked a previous question on how to optimize my search for SEO and users without JavaScript, and I figured out my answer by using RedirectToAction
However, in doing so, I've found a new issue that I need to resolve.
If I submit a search
"the quick brown fox jumped over the lazy dogs"
(trying to mimic Google with the "quotes" for complete phrases)
The application blows up on me (YSOD)
Illegal characters in path.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
The url looks like this (Firefox)
http://localhost/search/"the quick brown fox jumped over the lazy dogs"
I tried using Url.Encode
but that didn't work either... the url looks like
http://localhost/search/%2522the%2bquick%2bbrown%2bfox%2bjumped%2bover%2bthe%2blazy%2bdogs%2522
and the error says
Server Error in '/' Application.
HTTP Error 400 - Bad Request.
It must be something very obvious that I'm missing. Exception Details: System.ArgumentException: Illegal characters in path.