在我的处理程序代码试图返回重定向响应与必要的openid头/身体做用户代理重定向做认证,但是当我在操作结果中设置HTTPEntity的返回响应时,我得到406不可接受的客户?那有什么问题?以下代码不完整,并且具有原型质量!使用OpenRasta HTTPEntity作为返回响应时获取406?
这里是我的处理程序代码:
private static OpenIdRelyingParty openid = new OpenIdRelyingParty();
public OperationResult Get(string contentId)
{
var response = openid.GetResponse();
Identifier id;
Identifier.TryParse("https://www.google.com/accounts/o8/id", out id);
OutgoingWebResponse owr = openid.CreateRequest(id).RedirectingResponse;
HttpEntity he = new HttpEntity(new HttpHeaderDictionary(owr.Headers), owr.ResponseStream);
return new OperationResult.SeeOther { ResponseResource = he };
}
谢谢serialseb,我得到它的工作,有一个例外,响应只读标题,所以无法设置标题,有没有什么办法,我们可以做到这一点? – Overture
哪个托管是为? – SerialSeb