Blazor Server - JIT Debugger on Windows Server 2019 keeps the app unresponsive - iis

Good Day Everyone
I have post a question about this 7 months ago but it seems no one knows the answer for the question that's why I'm posting this question again, but the difference is, this is for Windows Server 2019
Here the link of my old post
Blazor Server - Slow load or unresponsive but still loading on browser (deployed to Windows Server 2016. IIS8)
We published our Blazor Server side application to our local server which is (now) Windows Server 2019, now the site becomes unresponsive when it encounters an error on the system, a JIT Debugger shows up on the server, that cause the sites unresponsiveness and also if we are updating the websites IIS, IT cannot delete or overwrite the files inside the folder because the JIT Debugger shows ups again. We disabled the JIT Debugger on the Visual Studio 2019 that is installed on the server, but still, the JIT Debugger still shows on the server, is there a way for the JIT Debugger not to show up on the server and makes the application working?
I hope someone can help me on this.
Thanks and regards.

Related

Blazor - Internal Server Error when running in IIS windows server 2012

When I run my Blazor WASM locally on IIS it works perfectly. But when I do it in a windows server 2012 R2 and I call it from my computer it gets stuck at "loading..." and I get a "500 (Internal Server Error)" for blazor.webassembly and blazor.boot.json
I cannot test it directly on the server since it has only internet explorer which is not compatible.
chrome developer tools printscreen
I have followed different tutorials, so I have already installed "URL rewrite" and the "Windows Hosting Bundle Installer".
Any idea what to try next? I have been searching in forums for two days now.

IIS Just in Time Popup

We had a classic ASP application that had to be migrated to a new Windows Server (Windows Server 2012 R2 Datacenter). IIS was already setup and we migrated the files configured the URL and DNS, as well as setting up the classic ASP components for IIS. The web application initially opens okay but the error below pops up on the server continually.
We checked the relevant site was configured to run 32bit and we ensured that in the sites "Debugging properties" the "Enable Server-side Debugging" was set to false. Also, all those testing the site we ensured in Internet Options >> Advanced the two values of "Disable script debugging" were checked. But this did not resolve the error. I believe we have all the necessary components setup in the server roles
I then followed this URL and deleted certain registry entries and restarted the server.
https://learn.microsoft.com/en-gb/visualstudio/debugger/just-in-time-debugging-in-visual-studio?view=vs-2015
This seemed to take away the above error but then the relevant application pool continually stops. I checked the application logs and at each time the application pool stops there is an error stating below
Since creating this ticket I installed DebugDiag 2 and set up a rule for IIS "Crashing". Ran the application until the relevant IIS Application Pool stopped and examined the Dump files created by the rule. All of them appear to have one error concerning "VCRUNTIME140.dll". See image below.
I found that this was a common issue and related to Visual C++ Redistributable 2015. I looked at installed programs and there was versions 2010, 2013 and 2017 installed. Microsoft state that after version 2013 subsequent versions incorporate the last. So I installed the latest version of Visual C++ Redistributable and restarted the server. This made no difference. So I uninstalled the latest version and installed version 2015 and restarted but again the application pool still stops after several actions on the web application.
Does anyone know how do I resolve this please?

visual studio 2017 remote debugging azure api app: "The breakpoint will not currently be hit. No symbols have been loaded for this document."

I'm trying to remote debug an asp.net core 1.1 api app (targeting .net framework 4.5.2) that's running on Azure.
I attach the debugger via Server Explorer. The debugger attaches to the correct process. But any breakpoint I set has the message "The breakpoint will not currently be hit. No symbols have been loaded for this document."
All answers I've seen to such a problem assume that the modules window shows all modules loaded by my project, but in my case the modules window is empty!
I'm on VS2017 15.4.
If I remember correctly, I was previously able to remote debug the same project with version 15.2. The problem started occurring when I updated to 15.3 but I didn't pursue it at the time.
I submitted the problem on the MS forums: Can't remote debug Azure API app
and now I have received an official reply that it is indeed a bug in VS, and a fix will be available in the pending release (15.6).
They also suggested a workaround, which I tried and indeed worked: Manually Attach a Debugger to Azure Web Apps
Which involves:
Going to the web app Application settings in the Azure portal, and making sure that Remote debugging is enabled,
In the VS menu: Debug > Attach to Process..., entering the web app url with the debugging port, e.g.:
myapp.azurewebsites.net:4022
Then in the credentials that appears, entering the username & password that are available in the app's Publish Profile, which can be downloaded from the portal. If the username is $myapp, it should be entered like this:
$myappp\$myapp
Then choosing Managed(v4.6, v4.5, v4.0) code and then the name of the Core app.
Actually, I had found and unsuccessfully tried similar approaches before. The key for me was step 3. The others had suggested entering the username as .\$myapp, or myapp\$myapp. So make sure to enter it as written above.
BTW, seeing that the above blog post is from almost 2 years ago (Feb 2016), whereas the problem I'm experiencing was introduced only a few months ago, it seems to be a cure-all, and it is therefore worthwhile, for anyone who has to deal with remote debugging Azure apps, to save this information for future reference.
UPDATE:
After updating VS 2017 to version 15.5.2 the problem seems to have been fixed.
I have had the same issue with Visual Studio 2019. The fix for me was just to go in the VS menu: Debug > Attach to Process, and try to connect as describe by #Dan Z. The connection was not established, saying No connections found, but attaching a debugger from Cloud Explorer again, right after an attempt in "Debug > Attach to Process" is always successful. That is most probably a bug in VS

Error when trying to remotely debug an azure website (HRESULT: 0x89710023)

I'm having troubles enabling remote debugging on sharepoint online. I have 2 machines, my local machine (Windows 8.1) and my development server(Windows Server 2008 R2). On my development server I first tried remote debugging using Visual Studio 2012 Update 4, as described here: http://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-troubleshoot-visual-studio/#remotedebug.
When this didn't work I tried doing exactly the same thing on my local machine, which has Visual Studio 2013 (Ultimate) update 1 and the latest windows azure sdk (2.3). This worked perfectly. Thinking upgrading to visual studio 2013 would solve my problem I've installed 2013 (Premium) on my dev server, next to 2010 and 2012. After installing and updating everything for 2 hours however, I came to the conclusion that I received the same error as on VS 2012.
Googling came up with a few interesting causes for this bug: sitenames longer than 20 characters or sitenames containing hyphens. This is not the case. Then I verified port settings, the dev server has no active firewall but I wanted to exclude any possibilities. And low and behold, both telnetting from my local machine as my dev server to ports 4016 and 4018 of my azurewebsites.net url worked.
Are there any other solutions for this bug? Since debugging locally is not an option (sharepoint provider hosted app for project online) this is very inconvenient.
Thanks,
UPDATE: Deploying the site as a cloud service works, and so does remote debugging them. However, we would like to stay with azure web sites for now..
I know this is a duplicate of Azure Remote Debugging: Failed to enable remote debuggingException from HRESULT: 0x89710023; but none of the solutions there or on twitter were of any use.
Check out Azure Remote Debugging: Failed to enable remote debuggingException from HRESULT: 0x89710023
I think this has to do with blocked ports 4016 and 4018

Default MVC5 Application will not run out of debug mode in browser VS Express 2013

I have just started to develop an application in Visual Studio 2013 using MVC5. I am using the default MVC application, I have made no changes. I find that running the application works fine while in debug mode however if I Stop Debugging Shift F5 and change from on page to another or refresh my application in the browser I find that the connection to the localhost server is disconnected. I get a message Firefox can't establish a connection to the server at localhost: I have tested another application developed in Visual Studio 2012 and now running on VS2013 and it runs as expected out of debug mode. Has anybody else come across this problem. What am I doing incorrectly?
Do you have Edit and Continue enabled? (This can be found under your projects Properties -> Web, at the bottom.
When you have Edit and Continue enabled, the VS debugger attaches invasively to the web server process (IIS Express). When you stop the debugger, this kills the IIS Express process as well. If E&C is turned off, the debugger does not use an invasive attach, which lets the debugger stop without killing the attached process.

Resources