If there is a problem with the customer environment and it is not possible to quickly locate the problem, you can decompilate debug traces with dnSpy.

Can go toDownload from dnSpyOr straight from mineShare linksDownload (built-in included. NET Framework 4.7.1. If you need to install NET Framework 4.7.1, you can decompress it to find itThe.net Framework 4.7.1 - x86 - x64 - AllOS - emu. ExeInstallation).

The specific operation steps are as follows:

  1. Add the system environment variable COMPLUS_ZapDisable = 1
  2. To debug the IIS process, enterC:\Windows\System32\inetsrvDirectory to performappcmd list wpView the corresponding application pool process ID
  3. Open dnSpy, debug -> Attach to process -> select the appropriate process ID- > Attach
  4. Debug –> Window –> Module –> Search for the assembly to debug –> Double-click
  5. In Assembly Explorer, find the class you want to debug and open it at the break point
  6. Right-click the class file you want to modify –> Edit class/method –> Modify class –> compile
  7. File –> Save module –> select the path to save –> Save
  8. Replace the saved recompiled assembly with the target path
  9. performiisreset(For IIS applications)

Follow my public account “how much do you know about micro services”, we will be there or square on wechat.

After reading this article, if you think this article is good and gain, please [tip] or [recommendation], also can [comment] leave your questions or suggestions to communicate with me. Your support is my inexhaustible motivation to create and share!

“SAN jie”
www.cnblogs.com/sheng-jie/