Debugging in Visual Studio 2022, get ERR_CONNECTION_RESET on start

9 tháng cách đây
Can anyone help?

I have Nop running in Azure in an AppService to a Azure Sql database, everything runs fine and can publish new code to the environment through VS 2022.

However, I can't debug in Visual Studio 2022, when I start the project I get ERR_CONNECTION_RESET. I would like to debug in Visual Studio to the Azure DB.

I updated the connection string to the Azure DB in the appsettings.json

Any ideas?
9 tháng cách đây
Ideas?

I don't have HTTPS enabled at this time so it looks like it is redirecting to HTTP but it is getting a 302 and then it repeats this same block of statements many times. I have a breakpoint on Nop.Web.Controllers.HomeController.Index but it doesn't break. It breaks if I change the DB to my localhost DB but not to the Azure sql server.

Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executing endpoint 'Nop.Web.Controllers.HomeController.Index (Nop.Web)'
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Information: Route matched with {action = "Index", controller = "Home", area = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.IActionResult Index() on controller Nop.Web.Controllers.HomeController (Nop.Web).
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Information: Authorization failed for the request at filter 'Nop.Web.Framework.Mvc.Filters.HttpsRequirementAttribute+HttpsRequirementFilter'.
Microsoft.AspNetCore.Mvc.Infrastructure.RedirectResultExecutor: Information: Executing RedirectResult, redirecting to http://localhost:44369/.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker: Information: Executed action Nop.Web.Controllers.HomeController.Index (Nop.Web) in 118.5115ms
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executed endpoint 'Nop.Web.Controllers.HomeController.Index (Nop.Web)'
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished HTTP/2 GET https://localhost:44369/ - - - 302 - - 132.5584ms
9 tháng cách đây
I resolved this, none of my stores had HTTPs so I turned it on for the main one and now I can run VS locally and point to the Azure DB remotely.