Während der Integration von Power Bi in MVC (. NET-Rahmen arbeiten 4.6.2)Methode nicht gefunden: 'Microsoft.PowerBI.Api.V1.PowerBIClient..ctor (Microsoft.Rest.ServiceClientCredentials, System.Net.Http.DelegatingHandler [])'
Fehler unterschritten.
Methode nicht gefunden: Void Microsoft.PowerBI.Api.V1.PowerBIClient..ctor(Microsoft.Rest.ServiceClientCredentials, System.Net.Http.DelegatingHandler[])
.
bei
var credentials = new TokenCredentials(accessKey, "AppKey");
var client = new PowerBIClient(credentials)
{
BaseUri = new Uri(apiUrl)
};
installiert
Microsoft.PowerBI.Core 1.1.6.17045
Microsoft.Rest.ClientRuntime
Microsoft.PowerBI.Api 1.1.6.17045
Stacktrace:
bei DSLUI.Controllers.ReportsController.Index() in E: \ DM \ DSLServices \ DSLUI \ Controllers \ ReportsController.cs: Zeile 53 bei Lambda_method (Closure, ControllerBase, Objekt []) bei System.Web.Mvc .ActionMethodDispatcher.Execute (Controller Controller, Object [] Parameter) bei System.Web.Mvc.ReflectedActionDescriptor.Execute (Controllercontroller, IDictionary 2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2 Parameter) bei System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39 (IAsyncResult asyncResult, ActionInvocation innerInvokeState) bei System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult 2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() bei System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod (IAsyncResult asyncResult) 0.123.bei System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3d() bei System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters. <> c__DisplayClass46.b__3f() bei System.Web.Mvc.Async.AsyncControllerActionInvoker. <> c__DisplayClass33.b__32 (IAsyncResult asyncResult) bei System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult 1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() bei System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters (IAsyncResult asyncResult) bei System.Web .Mvc.Async.AsyncControllerActionInvoker. <> c__DisplayClass21. <> c__DisplayClass2b.b__1c() bei System.Web.Mvc.Async.AsyncControllerActionInvoker. <> c__DisplayClass21.b__1e (IAsyncResult asyncResult) bei System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult 1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() bei System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction (IAsyncResult asyncResult) bei System.Web .Mvc.Controller.b__1d (IAsyncResult asyncResult, ExecuteCoreState Innerstate) bei System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid 1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() bei System.Web.Mvc.Controller.EndExecuteCore (IAsyncResult asyncResult) bei System .Web.Mvc.Controller.b__15 (IAsyncResult asyncResult, Controller-Controller) bei System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid 1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() bei System.Web.Mvc.Controll er.EndExecute (IAsyncResult asyncResult) bei System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute (IAsyncResult asyncResult) bei System.Web.Mvc.MvcHandler.b__5 (IAsyncResult asyncResult, ProcessRequestState Innerstate) bei System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid 1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() bei System.Web.Mvc.MvcHandler.EndProcessRequest (IAsyncResult asyncResult) bei System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest (IAsyncResult result) bei System.Web.HttpApplication .CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() bei System.Web.HttpApplication.ExecuteStep (IExecutionStep Schritt, Boolean & completedSynchronously)
jede mögliche Hilfe bitte ..
Haben Sie das gelesen Dokumentation oder durchsuchen Sie die Definition der Klasse 'PowerBIClient', um zu sehen, welche Parameter von diesem Konstruktor erwartet werden? –
ja lesen doc und Beispielcode Download von hier https://docs.microsoft.com/en-us/azure/power-bi-embedded/power-bi-embedded-get-started-sample. und es funktioniert gut. In meinem Fall habe ich ein Projekt mit .net Framework 4.0 ich aktualisierte 4.6.2 und fügte hinzu, dlls, 0 build errors.but zur Laufzeit im bekommen diese Ausnahme. –
Oh .. Ok .. Verstanden ... Erhalte Fehler in der Zeile 'var client = new PowerBIClient (credentials)' ?? Können Sie etwas mehr Informationen dazu geben? –