我有一个WPF应用程序,它使用SSLStream连接到服务器并发送/接收一些消息.我的代码更大程度上基于这个例子(SslTcpClient):https://msdn.microsoft.com/en-us/library/system.net.security.sslstream(v = vs.110).aspx .
这个工作好几个月了.但是,在获得此Windows更新(Windows 10版本1511和Windows Server 2016技术预览4的累积更新:2016年6月14日 - https://support.microsoft.com/en-us/kb/3163018)之后.我的应用开始报告此异常:
System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The Local Security Authority cannot be contacted
--- End of inner exception stack trace ---
at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, …Run Code Online (Sandbox Code Playgroud) 我正在使用带有身份2.1.0和VS2013 U4的ASP.NET MVC 5项目.我想在注册期间向用户添加声明,以便存储在db中.这些声明代表用户自定义属性.
当我为管理员创建一个用于创建/编辑/删除用户的网页时,我仍然使用create method AccountController来创建用户,但我不想登录该用户.如何将这些声明添加到用户?
我想从命令行启动我的应用程序并自动启动浏览器并显示默认页面(因为它是从 IDE 运行的)。我尝试使用这个命令:
dotnet run --launch-profile "MyApp"
Run Code Online (Sandbox Code Playgroud)
在我的应用程序 launchSettings.json 中,我定义了:
"MyApp": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:53348/"
}
Run Code Online (Sandbox Code Playgroud)
但浏览器无法启动。
.net asp.net command-line-interface asp.net-core asp.net-core-2.0