MDbgProcess WaitHandle not receiving signals from w3wp - w3wp

In trying to construct a managed debugger in C#, we are using the code from Microsoft.Samples.Debugging.MdbgEngine. The WaitHandle for our MDbgProcess receives signals from the underlying process just fine for console apps, winform apps, and IIS hosted ASP.Net apps on localhost. Once we move the target application, specifically the IIS hosted ASP.Net app to a server 2008 and 2012 OS, the WaitHandle stops receiving signals. We've tried lots of debugging steps, including but not limited to:
Copying dev builds of the application onto the server
Building debugger and target against
AnyCPU
x86
x64
Layering in exhaustive diagnostic messaging
Installing Visual Studio on the server and building everything there
Trying different app pools and different app pool settings
Has anyone ever used these components for ASP.Net on a server OS or have any ideas what might be going on?
https://github.com/SymbolSource/Microsoft.Samples.Debugging
thx

Related

Blazor Server - Slow load or unresponsive but still loading on browser (deployed to Windows Server 2016. IIS8)

Good Day everyone
We are currently testing our first Blazor Server application that is deployed on our Staging Server (Windows Server 2016 with IIS 8), we have noticed that, when the application is accessed by multiple users and doing some testing process, the application becomes slow, or sometimes when accessing the site again, the browser still loads the application but without rendering the design, we check it using the dev tools in google chrome, and on the network tab, it says "pending" under the time column.
We tried to ping the application, and it returns without too much latency, I don't know if this application side or on the server or the network, we deploy the project similar to our ASP.NET Core MVC projects, we are all testing the applications on our homes, because of the global pandemic.
Is there a different setup for Blazor Server when deploying to IIS?
I hope someone can help us with this.
Thanks, everyone, and regards.
Edit
We found the suspect, It's the Visual Studio JIT Debugger, yes we install VS2019 on our Staging Server, it's weird that we haven't encounter this from our other web application, is it because the project is in Blazor Server? when we check the server the JIT is running, and then the app is working again, I think when the application encounters an error, this shows up on the server side, and when it reach 3 JIT on the process, it will not continue to load the application.
I search for this and the answers is to disable the JIT Debugger, either in VS or in the register, is disabling this is the best solution??
Thanks again everyone.

Application Pool Crashes IIS 10 ASP.Net Core 3.2 Blazor App EF Core

I have an Asp.Net Core 3.2 Blazor Webassembly application that has been published to a server running Windows Server 2016 with IIS 10.
After publishing to the server I can browse the login page to the site, However, when I attempt to login which calls a service and signs in with Entity Framework Core 3.1.5.
However when I attempt to call a linq query on the DbContext it seems to fail (This is deduced from log files).
Interestingly, if I remote into the server whilst running a login I get a JIT popup with the following error;
In the Windows System Log can see the following error;
A process serving application pool 'myapppool(domain)(4.0)(pool)' suffered a fatal communication error with the Windows Process Activation Service. The process id was '10188'. The data field contains the error number.
It seems to sometime crashes the apppool as well so if I then refresh the page i get 502 error on the site?
Below is a screen shot of the application pool advanced settings;
The server is running Windows 2016 with Plesk Obsidian installed on it (I'm not sure if this can interfere in any way??)
Does anyone know whats going on here please?
I don’t know what’s going on since I can not reproduce your issue. Here is a workaround.
Please ensure that IIS Application pool’s Advanced Settings has set ”Enable 32-Bit Application” to true.
Check below link for troubleshooting the issue.
How to diagnose IIS fatal communication error problem

WCF Service strange Exception from Windows 8 Machine

I have a WCF Service that I am consuming in a web-application and I get strange behaviour from my Windows 8 machine:
When I compile the project from Windows 8, I get the following exception when trying to connect to the WCF Service:
The underlying connection was
closed: A connection that was expected to be kept alive was closed by
the server.
I get the same exception when I deploy it onto a Windows Server 2008.
However, if I compiled the project from Windows 7 and deploy it to the server, it works just fine.
I am using Visual Studio 2012 in both cases, although one is Premium and one is Ultimate.
After a lot of testing, it seems like when I just build and deploy the project often enough, at some point it will work, without having changed anything. It seems like the chance of getting a working project is about one in five. The Service works consistently, then, though.
If any of you have an idea what could be going on, that would be nice. If you need more info let me know.

Debug ASP Pages in HTTPD

We are developing ASP pages for a Windows CE device. We need to debug the ASP pages for reducing the development effort. The ASP pages uses a COM component for getting data from the device. The web server running on the Windows CE device is Httpd.
How can we debug the ASP pages running in Windows CE device?
You've run into one of the many joys of developing using the ASP server that ships with Windows CE. There is usually no way to do live debugging so you're largely relegated to using alert statements or DEBUGMSG from a COM component.
The one exception, and it's not all that easy either, is if you've created your own OS image and you have a BSP with KITL enabled. In that case you can build an OS with the debug version of the web server in it, deploy the OS from Platform Builder, attach with KITL and set break points down in the server code. You can then use those to step into the parsing of your own ASP page. It's a complete headache.
Shameless plug
Attempting to write anything useful with the built-in ASP server is so bad that we actually wrote a complete replacement. Our Padarn Web Server supports a subset of ASP.NET, was designed for CE (though it runs on the desktop as well) and best of all you can use C#/VB.NET and the Visual Studio debugger for your page code behind. The only downside is that it's not free - though if time is of any value, it certainly costs less than trying to use the built-in server.

WCF Server Application Unavailable - how to run application written in .NET4.0 (IIS6+)

I am trying to run simple application (e.g. generated from template by VS.NET 2010) on IIS6.
I changed it to run with .NET 4.0 (its application pool) and checked with regiis (this pool has 4.0). I also changed all possible httpHandlers (svc etc), to run with NET4.0. All possible rights are checked (i think so).
Almost every request results in "Server Application Unavailable" (sometimes it is empty page with -2146232576 (0x80131700) value) and "...Please review this log entry to discover what caused this error to occur." but EventViewer and IIS Log are empty.
Any ideas? Where to find error details?
Do you run any 2.0 apps on the same server? If yes it could be the issue in case they bot use the same application pool. The application tool itself doesn't have any .NET version setting, it's per virtual directory (application). But you can't use the same application pool to run applications with different versions of .NET Framework apps.
Create two seperate app pools one for your CLR 2.0 and CLR 4.0, the older clr can not host both CLRs, there was a similar issue with 1.1 and 2.0.
cheers
A little bit old question, but still could help someone...
If you installed the higher .NET f/w recently, check, if your apps written for lower versions of .NET f/w were not (automatically) moved to new app pool for the higher f/w.
Many years ago something similar happenned to me after f/w 3.5 installation. Then my 3.5 application worked fine, but after any of the 2.0 apps was firstly called, the app pool crashed.
Needed to move every app to corresponding app pool.