我正在使用Visual Studio 2015企业版并创建了简单的Asp.net5应用程序.当我尝试调试时,我收到此错误.
The Dnx Runtime package needs to be installed. See output window for more details
Run Code Online (Sandbox Code Playgroud)
这是我的项目设置:
Solution DNX SDK Version : 1.0.0-beta5,
Platform : .NET Core
Architecture : x64
Run Code Online (Sandbox Code Playgroud)
(也尝试使用x86)
此外,按照此链接中提到的步骤,但他们没有帮助.
尝试重新安装VS2015,但没有运气.知道我错过了什么吗?
尝试从控制台客户端使用ADAL从Azure AD访问令牌时获取异常.
脚步:
ADAL版本使用: Microsoft.IdentityModel.Clients.ActiveDirectory 2.6.0-alpha
控制台应用代码:
void GetToken()
{
clientId = "be6b055a-4efc-222a-2187-49657e6f4f1b";
string ClientKey = "c/uIMlsqn9SzJLKKyBle42Ym+tgcaC2tbMlWxJQawE";
string ClientCredential clientCred = new ClientCredential(clientId, ClientKey);
authenticationContext = new AuthenticationContext("https://login.windows.net/MyDevAD.onmicrosoft.com");
authenticationResult = authenticationContext.AcquireToken("https://mylocalwebapiapp.com/", clientCred);
....
}
Run Code Online (Sandbox Code Playgroud)
================================================== ================================================== ================================================== ==============
小提琴输入:
POST https://login.windows.net/MyDevAD.onmicrosoft.com/oauth2/token HTTP/1.1 Content-Type:application/x-www-form-urlencoded client-request-id:53262b17-1234-4ed9-bdb3- 748d332eb44b return-client-request-id:true x-client-SKU:.NET x-client-Ver:2.6.0.0 x-client-CPU:x64 x-client-OS:Microsoft Windows NT 6.3.9600.0主机:登录. windows.net内容长度:185期望:100-continue连接:Keep-Alive
grant_type = client_credentials&资源= HTTPS%3A%2F%2Flocalhost%3A44307%2F&CLIENT_ID = be6b055a-4efc-408A-8187-42137e6f4f1b&client_secret = C%2FuIMlsqn9SzJLKKyBle123Ym%2BtgcaC3tbMlWxJQawE%3D
================================================== ================================================== ================================================== ============== 小提琴输出:
HTTP/1.1 400 Bad Request …