我正在尝试使用我的mvc控制器上的以下内容登录Azure AD B2C:
public async Task<ActionResult> AZLogin()
{
var result = await MsalAppBuilder.BuildPublicClientApplication().AcquireTokenInteractive(Globals.Scopes).ExecuteAsync();
return null;
}但是我遇到了这样的情况:
ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded apartment.我该怎么做呢?
发布于 2020-10-15 20:58:30
尝试将STAThread属性添加到应用程序入口点方法中,或者也读取答案Single-threaded apartment - cannot instantiate ActiveX control
https://stackoverflow.com/questions/64371854
复制相似问题