Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.NET MVC - Search Criteria as Route Parameter in stead of querystring - Illegal Characters
    primarykey
    data
    text
    <p>I asked a previous question on <a href="https://stackoverflow.com/questions/3536171/asp-net-mvc-what-is-the-best-way-to-build-a-search-form-that-works-properly-wit/3536764#3536764">how to optimize my search for SEO and users without JavaScript</a>, and I figured out my answer by using <code>RedirectToAction</code></p> <p>However, in doing so, I've found a new issue that I need to resolve.</p> <p>If I submit a search</p> <blockquote> <p>"the quick brown fox jumped over the lazy dogs"</p> </blockquote> <p>(trying to mimic Google with the "quotes" for complete phrases)</p> <p>The application blows up on me (YSOD)</p> <blockquote> <p>Illegal characters in path.<br> 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.</p> </blockquote> <p>The url looks like this (Firefox)<br> <a href="http://localhost/search/" rel="nofollow noreferrer">http://localhost/search/</a>"the quick brown fox jumped over the lazy dogs"</p> <p>I tried using <code>Url.Encode</code> but that didn't work either... the url looks like<br> <a href="http://localhost/search/%2522the%2bquick%2bbrown%2bfox%2bjumped%2bover%2bthe%2blazy%2bdogs%2522" rel="nofollow noreferrer">http://localhost/search/%2522the%2bquick%2bbrown%2bfox%2bjumped%2bover%2bthe%2blazy%2bdogs%2522</a></p> <p>and the error says</p> <blockquote> <p>Server Error in '/' Application.<br> HTTP Error 400 - Bad Request. </p> </blockquote> <p>It must be something very obvious that I'm missing. Exception Details: System.ArgumentException: Illegal characters in path.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload