Try our conversational search powered by Generative AI!

Invalid URI: There is an invalid sequence in the string

Vote:
 

Hi,

I'm getting a .net yellow page when I'm doing a redirect to a page with åäö in the URL. It's a simple search form where users enter a search phrase into a text box. When the user submits the form I create a URL to the search listing page. The contents in the form is URLEncoded before redirecting.

But on the search result-page I get a .net-error:

"Invalid URI: There is an invalid sequence in the string.
Exception Details: System.UriFormatException: Invalid URI: There is an invalid sequence in the string."

The URL looks something like this:

"http:///Sokresultat/?ph=S%c3%b6k+Person&searchtype=person"

The phrase searched is "Sök Person", but all texts with åäö cause the same problem.

I'm running EPiServer 5.1.422.256. Any ideas what might cause the problem?

Regards,

Peter

#25002
Oct 09, 2008 10:21
Vote:
 

I forgot to mention that the site is an internal intranet site where users are always logged on (through integrated authentication).

Stack-trace;

System.Uri.UnescapeString(Char* pStr, Int32 start, Int32 end, Char[] dest, Int32& destPosition, Char rsvd1, Char rsvd2, Char rsvd3, UnescapeMode unescapeMode, UriParser syntax, Boolean isQuery, Boolean readOnlyConfig) +1197
System.Uri.UnescapeString(String input, Int32 start, Int32 end, Char[] dest, Int32& destPosition, Char rsvd1, Char rsvd2, Char rsvd3, UnescapeMode unescapeMode, UriParser syntax, Boolean isQuery, Boolean readOnlyConfig) +83
System.Uri.UnescapeDataString(String stringToUnescape) +149
EPiServer.UrlBuilder.ToString() +12
EPiServer.Web.PermanentLinkUtility.GetPageReference(UrlBuilder mappedUrl) +79
EPiServer.Web.FriendlyHtmlRewriteToExternal.HtmlRewriteUrl(UrlBuilder internalUrl, UrlBuilder externalUrl, UrlBuilder url, Encoding encoding, Object& internalObject) +16
EPiServer.Web.FriendlyHtmlRewriteToExternal.rewritePipe_HtmlRewriteUrl(Object sender, HtmlRewriteEventArgs e) +298
EPiServer.Web.RewritePipe.OnHtmlRewriteUrl(HtmlRewriteEventArgs e) +20
EPiServer.Web.HtmlRewritePipe.WriteElement(MyHtmlRewriteEventArgs e, SgmlReader reader, TextWriter writer) +426
EPiServer.Web.HtmlRewritePipe.RewriteToEnd(TextReader reader, TextWriter writer) +1532
EPiServer.Web.HtmlRewriteStream.Close() +160
System.Web.HttpWriter.Filter(Boolean finalFiltering) +310
System.Web.HttpResponse.FilterOutput() +97

 

#25003
Edited, Oct 09, 2008 10:22
Vote:
 
#25006
Oct 09, 2008 10:58
Vote:
 

Hi, 

This is registered bug which has been fixed in SP3
Bug #10555: Querystring with åäö crashes page if friendlyurl is enabled

Possible Workaround:
Do you have a file named: EPiServerLog.config in your site root? If you have, and that file contains a root logger on <level value="debug" />, change that to <level value="error" /> your page will not crash anymore.

#25007
Oct 09, 2008 11:02
Vote:
 

Thank you!! Logging error messages only solved it.

I thought I was going crazy because I've seen the error appear and disappear w/o any real explanation =)

#25008
Oct 09, 2008 11:09
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.