System.ArgumentException: Specified value has invalid Control characters

1,159 views
Skip to first unread message

Bill

unread,
Sep 17, 2009, 10:38:04 AM9/17/09
to dotnetopenid
I'm getting an error sporadically for this line:
var response = openIdRelyingParty.GetResponse();

Any help would be really appreciated.

Error details:
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.

Exception Details: System.ArgumentException: Specified value has
invalid Control characters.
Parameter name: value

[ArgumentException: Specified value has invalid Control characters.
Parameter name: value]
System.Net.WebHeaderCollection.CheckBadChars(String name, Boolean
isHeaderValue) +5327257
System.Net.WebHeaderCollection.Add(String name, String value) +44
DotNetOpenAuth.Messaging.HttpRequestInfo.GetHeaderCollection
(NameValueCollection pairs) in c:\Users\andarno\git\dotnetopenid\src
\DotNetOpenAuth\Messaging\HttpRequestInfo.cs:370
DotNetOpenAuth.Messaging.HttpRequestInfo..ctor(HttpRequest request)
in c:\Users\andarno\git\dotnetopenid\src\DotNetOpenAuth\Messaging
\HttpRequestInfo.cs:60
DotNetOpenAuth.Messaging.Channel.GetRequestFromContext() in c:\Users
\andarno\git\dotnetopenid\src\DotNetOpenAuth\Messaging\Channel.cs:454
DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.GetResponse()
in c:\Users\andarno\git\dotnetopenid\src\DotNetOpenAuth\OpenId
\RelyingParty\OpenIdRelyingParty.cs:478

Andrew Arnott

unread,
Sep 17, 2009, 12:08:08 PM9/17/09
to dotnetopenid
The only cause for this I can find is invalid incoming HTTP headers.  I've made a change based on your exception so that in future releases these errors are silently ignored (emitting a warning to the log) so it doesn't crash your web site.

If you can capture and forward the HTTP headers that reproduce this problem, I'd love to see it.
--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death your right to say it." - S. G. Tallentyre


2009/9/17 Bill <biyu...@gmail.com>
Reply all
Reply to author
Forward
0 new messages