Hi Team.
I have developed my own .NET core profiler using VS 2019. To load my profiler, I have set the environment entry in the web.config file.
<environmentVariable name="CORECLR_ENABLE_PROFILING" value="1" />
<environmentVariable name="CORECLR_PROFILER" value="{cf0d821e-299b-5307-a3d8-b283c03916dd}" />
<environmentVariable name="CORECLR_PROFILER_PATH_64" value="C:\apps\Publish_3.0\Publish_3.0\ClrProfiler.dll" />
<environmentVariable name="CORECLR_PROFILER_PATH_32" value="C:\apps\Publish_3.0\Publish_3.0\ClrProfiler32.dll" />
I am able to profile a 64 bit .NET core application that is hosted in IIS.
But, When I try to run 32 bit .NET core application got the below exception due to my profiler.
[aspnetcorev2_inprocess.dll] Event Log: 'Application '/LM/W3SVC/5/ROOT' with physical root 'E:\netcoreapp\bin\Release\netcoreapp3.1\publish\' hit unexpected managed exception, exception code = '0xe0434352'. First 30KB characters of captured stdout and stderr logs:
Unhandled exception. System.BadImageFormatException: Bad binary signature. (0x80131192)
at net core azure.Program.Main(String[] args)
End Event Log Message.
Then I have enabled the debug logs in my .NET core profiler. The below line of code has the problem. (il_writer.cpp, 636)
Please help me why this line of code gives the problem.
![186417-capture.jpg][2]
NOTE: My Helperassembly.dll builds in AnyCPU architecture. [2]: /api/attachments/186417-capture.jpg?platform=QnA