If your .NET application is no longer responding on production you might want to urgently restart the process. However, if you do that you will lose valuable information into why it got unresponsive.

Let's collect that valuable information and after that restart the application.

First of all download a tool called procdump.exe (you can find it here: https://learn.microsoft.com/en-us/sysinternals/downloads/procdump) It is a small executable, without installation, that you can use via commandline. Copy the tool to the server.

Before we start: there are some things that you will need:

  • Dump Type
  • Process ID

Figuring out the Dump Type

Since you have an unresponsive application and you plan to restart it, and thus don't have a second chance to capture the data, you want a full dump.

Figuring out the Process ID:

There are multiple ways to figure out the Process ID, I will leave that up to you.

Now the command that you want:

procdump <dumptype> <process id>

Example:

procdump -ma 18228

The result will look like this: