I'm facing an issue with my (Register with Windows Live Account) feature in my portal
Simply the feature was suddenly stopped without any known reason and throws the following exception
Exception Message: Unexpected response Content-Type text/html
Source:
DotNetOpenAuth.Core
Stack Trace: at DotNetOpenAuth.Messaging.ErrorUtilities.VerifyProtocol(Boolean condition, String unformattedMessage, Object[] args) at DotNetOpenAuth.Messaging.ErrorUtilities.ThrowProtocol(String unformattedMessage, Object[] args) at DotNetOpenAuth.OAuth2.ChannelElements.OAuth2ClientChannel.ReadFromResponseCore(IncomingWebResponse response) at DotNetOpenAuth.Messaging.Channel.RequestCore(IDirectedProtocolMessage request) at DotNetOpenAuth.Messaging.Channel.Request(IDirectedProtocolMessage requestMessage) at DotNetOpenAuth.OAuth2.ClientBase.UpdateAuthorizationWithResponse(IAuthorizationState authorizationState, EndUserAuthorizationSuccessAuthCodeResponse authorizationSuccess) at DotNetOpenAuth.OAuth2.WebServerClient.ProcessUserAuthorization(HttpRequestBase request) at Ta3malWebParts.Membership.Registration.Registration.HandleWindowsLiveAuthorization()
The method causes this error is (WebServerClient.PrepareRequestUserAuthorization) this method should receive a JSON response from Windows Live, when i used Fiddler to check the response i found that the response content is JSON but the response header states that the response type is HTML, the above method contains an internal function validates if the returned response type is JSON or not, this validation throws the above exception.
Does any one have any idea how can we solve this issue.
Thanks in advance.