You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Troubleshooting development mode
Your project worked like a dream. then I try to modify it to run in HTTPS--first editing the product properties to be HTTPS in Visual Studio, using the recommended https: port number.
Eventually I found this dotnet/aspnetcore#1486, added the right extra references into the Startup.cs file, and now I can run https: at whatever port I want, but the hot swap recompilation stopped working.
I recreated the project from scratch. As soon as I uncomment the two commented lines below (Startup.cs), web site works fine, but hot module swap stops functioning.
.UseKestrel(options =>
{
var serverCertificate = LoadCertificate();
//options.UseHttps(serverCertificate);
})
HotModuleReplacement is being ran in http, and you have .net on https. You need to run webpack-Dev-server with --https, but I'm not sure if aspnet-webpack is setup to currently handle that situation. Steve would know best!
Thanks, Mark. This code is using the AspNetCore's UseWebpackDevMiddleware. When you look at the source code for it, line 17 hard-codes that to http. Seems like that may be my issue. Please let me know if you think I should look elsewhere. Otherwise, I'll submit this issue to that team.
Ahh nice catch, didn't have a chance to look last night.
Yes it looks like we need to add a new option to WebpackDevMiddlewareOptions for https. Let me give it a test run and see if I can get it all working before putting in a fix.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/271#issuecomment-241034304, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AORU4ykSlPZrAWsMKGzl_RN_Rr_UiHzjks5qhb4xgaJpZM4JoDpu.
This is now fixed. Now, the HMR integration handles /__webpack_hmr requests by reverse-proxying them, instead of 302-redirecting, to the underlying Node service. That means it's independent of what scheme/hostname/etc the browser is connecting on, because the browser never sees the Node HMR service directly any more.
To get this fix, upgrade to a newer version of Microsoft.AspNetCore.SpaServices. However I haven't yet published this update to NuGet - will do so shortly.
Unfortunately I've had to revert the change that fixed this, because of issues with long-running requests triggering ECANCELED/EPIPE broken pipe errors.
I've submitted a repro to the Kestrel repo and will hopefully put in a better event-stream proxying implementation here once they let me know what (if anything) is the supported way to do this.
Thanks!
From: Steve Sanderson [mailto:notifications@github.com]
Sent: Wednesday, November 30, 2016 11:56 AM
To: aspnet/JavaScriptServices <JavaScriptServices@noreply.github.com>
Cc: George Langdon <george@rcxrules.com>; Author <author@noreply.github.com>
Subject: Re: [aspnet/JavaScriptServices] Hot swap stops working when you enable HTTPS (#271)
Closed #271<#271> via e2f8031<e2f8031>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#271 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AORU4--KCs21QEFbDIEZ3EGUOJdrRYpXks5rDaq6gaJpZM4JoDpu>.
Activity
MarkPieszak commentedon Aug 19, 2016
HotModuleReplacement is being ran in http, and you have .net on https. You need to run webpack-Dev-server with --https, but I'm not sure if aspnet-webpack is setup to currently handle that situation. Steve would know best!
glangdonvt commentedon Aug 19, 2016
Thanks, Mark. This code is using the AspNetCore's UseWebpackDevMiddleware. When you look at the source code for it, line 17 hard-codes that to http. Seems like that may be my issue. Please let me know if you think I should look elsewhere. Otherwise, I'll submit this issue to that team.
13 namespace Microsoft.AspNetCore.Builder
14 {
15 public static class WebpackDevMiddleware
16 {
17 private const string WebpackDevMiddlewareScheme = "http";
18 private const string WebpackHotMiddlewareEndpoint = "/__webpack_hmr";
19 private const string DefaultConfigFile = "webpack.config.js";
MarkPieszak commentedon Aug 19, 2016
Ahh nice catch, didn't have a chance to look last night.
Yes it looks like we need to add a new option to
WebpackDevMiddlewareOptionsfor https. Let me give it a test run and see if I can get it all working before putting in a fix.MarkPieszak commentedon Aug 19, 2016
Should be all set with PR #272
glangdonvt commentedon Aug 19, 2016
Thanks, Mark, I’ll try it out over the weekend.
George
From: Mark Pieszak [mailto:notifications@github.com]
Sent: Friday, August 19, 2016 10:31 AM
To: aspnet/JavaScriptServices JavaScriptServices@noreply.github.com
Cc: George Langdon george@rcxrules.com; Author author@noreply.github.com
Subject: Re: [aspnet/JavaScriptServices] Hot swap stops working when you enable HTTPS (#271)
Should be all set with PR #272#272
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/271#issuecomment-241034304, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AORU4ykSlPZrAWsMKGzl_RN_Rr_UiHzjks5qhb4xgaJpZM4JoDpu.
SteveSandersonMS commentedon Sep 9, 2016
This is now fixed. Now, the HMR integration handles
/__webpack_hmrrequests by reverse-proxying them, instead of 302-redirecting, to the underlying Node service. That means it's independent of what scheme/hostname/etc the browser is connecting on, because the browser never sees the Node HMR service directly any more.To get this fix, upgrade to a newer version of
Microsoft.AspNetCore.SpaServices. However I haven't yet published this update to NuGet - will do so shortly.SteveSandersonMS commentedon Sep 9, 2016
Update: The newer Microsoft.AspNetCore.SpaServices (and related packages) is now published to NuGet
glangdonvt commentedon Sep 9, 2016
Thanks! NOW I'll try it over the weekend.
SteveSandersonMS commentedon Sep 13, 2016
Unfortunately I've had to revert the change that fixed this, because of issues with long-running requests triggering
ECANCELED/EPIPE brokenpipe errors.I've submitted a repro to the Kestrel repo and will hopefully put in a better event-stream proxying implementation here once they let me know what (if anything) is the supported way to do this.
glangdonvt commentedon Sep 13, 2016
Thanks for the heads up.
boban100janovski commentedon Oct 20, 2016
Any progress considering this issue?
MarkPieszak commentedon Oct 20, 2016
It looks like core 1.1 will have part of the fix in it when it comes out (if I understood the kestrel thread right). @boban984
glangdonvt commentedon Nov 30, 2016