DotNetOpenAuth.Messaging.ProtocolException: Unexpected response Content-Type text/html

752 views
Skip to first unread message

Carlos Ernesto Ríos Ochoa

unread,
Aug 26, 2013, 12:33:23 PM8/26/13
to dotnet...@googlegroups.com
Hi! I get this Exception DotNetOpenAuth.Messaging.ProtocolException, Anyone have any idea
[ProtocolException: Unexpected response Content-Type text/html]
   DotNetOpenAuth.Messaging.ErrorUtilities.VerifyProtocol(Boolean condition, String unformattedMessage, Object[] args) +373
   DotNetOpenAuth.Messaging.ErrorUtilities.ThrowProtocol(String unformattedMessage, Object[] args) +69
   DotNetOpenAuth.OAuth2.ChannelElements.OAuth2ClientChannel.ReadFromResponseCore(IncomingWebResponse response) +443
   DotNetOpenAuth.Messaging.Channel.RequestCore(IDirectedProtocolMessage request) +603

Dylan Beattie

unread,
Aug 28, 2013, 11:25:08 AM8/28/13
to dotnet...@googlegroups.com
Check your server isn't returning a 500 Internal Server Error. ASP.NET returns error pages as text/html even if your request was for a different Content-Type, which means most web service clients (including DotNetOpenAuth) don't recognise the response since they asked for JSON or XML and got back an HTML page instead.

Using a proxy such as Fiddler (http://fiddler2.com/) will show you what's actually being sent and received by your client and server - check out http://fiddler2.com/documentation/Observe-Traffic/Troubleshooting/NoTrafficToLocalhost to see how to capture localhost traffic with it.

-D-


--
You received this message because you are subscribed to the Google Groups "DotNetOpenAuth" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotnetopenid...@googlegroups.com.
To post to this group, send email to dotnet...@googlegroups.com.
Visit this group at http://groups.google.com/group/dotnetopenid.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages