In VS2019, things work fine, in VS2022 release, this happens when you try to browse to the metadata url, or any of the other pages in it:
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished in 56.7912ms 200 text/html; charset=utf-8
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/2 GET https://localhost:5000/capi/metadata
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id “0HMD3JVTFL9RL”, Request id “0HMD3JVTFL9RL:0000000F”: An unhandled exception was thrown by the application.
System.InvalidOperationException: An asynchronous socket operation is already in progress using this SocketAsyncEventArgs instance.
at System.Net.Sockets.SocketAsyncEventArgs.ThrowForNonFreeStatus(Int32 status)
at System.Net.Sockets.SocketAsyncEventArgs.set_BufferList(IList1 value) at Microsoft.WebTools.BrowserLink.Net.SocketAdapter.SendAsync(IList
1 buffers)
— End of stack trace from previous location where exception was thrown —
at Microsoft.WebTools.BrowserLink.Net.DelayConnectingHttpSocketAdapter.Microsoft.WebTools.BrowserLink.Net.IHttpSocketAdapter.CompleteRequestAsync()
at Microsoft.WebTools.BrowserLink.Net.ScriptInjectionFilterStream.WaitForFilterCompleteAsync()
at Microsoft.WebTools.BrowserLink.Net.BrowserLinkMiddleware.ExecuteWithFilterAsync(IHttpSocketAdapter injectScriptSocket, String requestId, HttpContext httpContext)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished in 48.65ms 500
once deployed and hosted with iis, it seems to work fine again, but if you start the project up in VS2022 (non iis), you get this every time.
starting up the main project exe manually also works just fine, so this seems to be something related to VS2022 hosting
anything i can quickly check/tweak here?