2012-01-03 2 views
0

방금 ​​다음 지침을 따랐습니다 here.Azure ACS (HTTPS 및 다중 인스턴스 포함) 오류

두 블로그 항목 herehere이 다소 유용하다는 사실을 알았습니다.

하지만 여전히 ASP.NET MVC3 응용 프로그램이 Azure에서 HTTPS 끝점에서 실행되는 경우 이상한 문제가 발생합니다. HTTPS 인증서를로드했고 문제없이 일정한 시간 동안 단일 역할 인스턴스에 일관되게 배포했습니다. 그러나 최근에는 여러 인스턴스를 배포하기 시작하고 '지정된 상태에서 사용할 수없는 키'및 '값을 null 일 수 없습니다.'라는 오류 메시지가 나타났습니다. 매개 변수 이름 : 인증서 'erors.

하지만 지금은 새로운 있습니다 '. 스트림의 끝을지나 읽을 수 없습니다'

예쁜 바닐라가 보인다. DPAPI에서 RSA 쿠키로 이동하는 문제가 스택 추적을 볼 때까지 변환된다는 것은 분명하지 않습니다.

[EndOfStreamException :. 스트림의 끝을 넘어 읽을 수 없습니다] System.IO.MemoryStream.InternalReadInt32() 12,750,266 Microsoft.IdentityModel.Web.RsaEncryptionCookieTransform.Decode (바이트 [] 부호화) 369 Microsoft.IdentityModel.Tokens.SessionSecurityTokenHandler.ApplyTransforms (바이트 [] 쿠키 부울 발신) 189 Microsoft.IdentityModel.Tokens.SessionSecurityTokenHandler.ReadToken (XmlReader를 리더 SecurityTokenResolver tokenResolver) 862 Microsoft.IdentityModel.Tokens.SessionSecurityTokenHandler.ReadToken (Byte [] token, SecurityTokenResolver tokenResolver) +109 Microsoft.IdentityModel.Web.SessionAuthentication Module.ReadSessionTokenFromCookie (바이트 []부터 SessionCookie) +356 Microsoft.IdentityModel.Web.SessionAuthenticationModule.TryReadSessionTokenFromCookie (SessionSecurityToken & sessionToken) +123 Microsoft.IdentityModel.Web.SessionAuthenticationModule.OnAuthenticateRequest (객체 송신자있는 EventArgs있는 EventArgs) +61 시스템. Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 80 (IExecutionStep 단계, 부울 & completedSynchronously)는 270

전 세계에 다음 코드를 추가했습니다. 아삭사 :

뿐만 아니라이 코드는 :

void WSFederationAuthenticationModule_RedirectingToIdentityProvider(object sender, RedirectingToIdentityProviderEventArgs e) 
    { 
     // In the Windows Azure environment, build a wreply parameter for the SignIn request 
     // that reflects the real address of the application. 
     HttpRequest request = HttpContext.Current.Request; 
     Uri requestUrl = request.Url; 
     StringBuilder wreply = new StringBuilder(); 
     wreply.Append(requestUrl.Scheme); // e.g. "http" or "https" 
     wreply.Append("://"); 
     wreply.Append(request.Headers["Host"] ?? requestUrl.Authority); 
     wreply.Append(request.ApplicationPath); 
     if (!request.ApplicationPath.EndsWith("/")) wreply.Append("/"); e.SignInRequestMessage.Reply = wreply.ToString(); 
    } 
+0

이 문제도 발생합니다. 매우 실망 스럽습니다. 해결책을 찾았 으면 알려주세요! –

답변

0

나는 최근에 비슷한 문제에 근무하고 잠재적 인 이유는 이전의 SDK 및 ACS의 조합이었다. SDK 1.6 및 ACSv2 설정을 사용하려고하면이 문제가 발생하지 않기를 바라며 여전히 문제가있는 경우 근본 원인을 찾아 내서 기꺼이 도와 드리겠습니다.