Last active
March 1, 2016 16:31
-
-
Save hoetz/fe3b7b17eb847cb16364 to your computer and use it in GitHub Desktop.
Kestrel+HTTPS on Mac OS X problem (aspnet core RC1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in startup.cs | |
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory,IApplicationEnvironment appEnv) | |
{ | |
var testCertPath = Path.Combine(appEnv.ApplicationBasePath,"certificate.pfx"); | |
if (File.Exists(testCertPath)) | |
{ | |
app.UseKestrelHttps(new X509Certificate2(testCertPath, "PASSWORD")); | |
} | |
... | |
.. | |
in project.json | |
"commands": { | |
"web": "Microsoft.AspNet.Server.Kestrel --ASPNET_ENV development --server.urls https://localhost:44375" | |
}, | |
... | |
Problem: when launching dnx web -> first request gets stuck: | |
info: Microsoft.AspNet.Authentication.OpenIdConnect.OpenIdConnectMiddleware[5] | |
AuthenticationScheme: OpenIdConnect was challenged. | |
info: Microsoft.AspNet.Mvc.ChallengeResult[1] | |
Executing ChallengeResult with authentication schemes (). | |
info: Microsoft.AspNet.Mvc.Infrastructure.MvcRouteHandler[2] | |
Executed action AzureManage.Web.Controllers.HomeController.Index in 0.0786ms | |
info: Microsoft.AspNet.Hosting.Internal.HostingEngine[2] | |
Request finished in 0,0908ms 302 | |
fail: Microsoft.AspNet.Server.Kestrel[0] | |
ConnectionFilter.OnConnection | |
System.AggregateException: One or more errors occurred. ---> System.IO.IOException: The authentication or decryption has failed. | |
---> System.NullReferenceException: Object reference not set to an instance of an object | |
at Mono.Security.Protocol.Tls.Handshake.Server.TlsServerHello.ProcessAsTls1 () [0x00000] in <filename unknown>:0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment