내 MVC 웹 사이트에서 Google Analytics api를 사용하고 싶습니다. api 서비스 계정을 사용하여 인증하고 oauth2는 내 localhost에 문제가 없지만 Azure에 배포하면 502 오류가 발생합니다. :Google Analytics Api on Azure
"502 - Web server received an invalid response while acting as a gateway or proxy server. There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server."
은을 heres 내 코드 : 그것을 일으키는 원인이 뭐죠
const string ServiceAccountUser = "[email protected]count.com";
AssertionFlowClient client = new AssertionFlowClient(
GoogleAuthenticationServer.Description,
new X509Certificate2(System.Web.Hosting.HostingEnvironment.MapPath("/Areas/Admin/xxxxxxxxxxxxxxxxxx-privatekey.p12"),
"notasecret", X509KeyStorageFlags.Exportable))
{
Scope = AnalyticsService.Scopes.AnalyticsReadonly.GetStringValue(),
ServiceAccountId = ServiceAccountUser //Bug, why does ServiceAccountUser have to be assigned to ServiceAccountId
//,ServiceAccountUser = ServiceAccountUser
};
OAuth2Authenticator<AssertionFlowClient> authenticator = new OAuth2Authenticator<AssertionFlowClient>(client, AssertionFlowClient.GetState);
알아낼 질수? Azure에서 뭔가 빠진거야?
도움 주셔서 감사합니다.
정말 놀라운 작품! 고마워, 너의 도움 없이는 절대로 그렇게하지 못했을거야. –
Goodone Martyn 여기 구글 분석 API를 구현에 우리는 많은 도움이 없어 결국 결국 스스로 문제를 해결할 수있다 –