Ich möchte die Google Analytics API auf meiner MVC-Website verwenden, die Authentifizierung mit dem API-Dienstkonto und oauth2 mit keine Probleme auf meinem lokalen Host, aber sobald ich Azure bereitstellen, erhalte ich einen Fehler 502 :Google Analytics API auf 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 mein Code:
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);
ich kann nicht herausfinden was es verursacht? Fehle ich etwas in Azure?
Danke für jede Hilfe.
Erstaunlich funktioniert perfekt! Vielen Dank, ich hätte das nie ohne deine Hilfe bekommen. –
Goodone Martyn Hier in Google Analytics API-Implementierung haben wir nicht viel Hilfe und müssen schließlich Problem selbst beheben –