【发布时间】:2017-04-25 11:21:03
【问题描述】:
我们在 IIS 中部署项目时遇到以下错误,从 Visual Studio 运行时它工作正常。
调用以下方法获取AccessToken时出错
return authContext.AcquireToken(this.PowerBiAPI, this.ClientID, new Uri(this.RedirectUrl)).AccessToken;
错误是:
System.InvalidOperationException:
Showing a modal dialog box or form when the application is not running in
UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly
style to display a notification from a service application.
at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.RunAsyncTask[T](Task`1 task)
at DSLUI.Controllers.BusinessLogic.ReportService.GetAccessToken()
这里为 App Type: Native 生成 this.ClientID
网络:https://dev.powerbi.com/apps
如果有人对上述错误有任何想法,请帮助我们。
【问题讨论】:
标签: asp.net-mvc azure iis powerbi powerbi-embedded