I am trying to inject my helper function definitions that resides in a security safe critical assembly from unmanaged code during JITCompilationStarted callback function. I use COR_PRF_DISABLE_TRANSPARENCY_CHECKS_UNDER_FULL_TRUSTto inject into security transparent functions from the answer in my previous question.
I am injecting the function definition in the functions of System.Web.dll and also i tried to inject in all the module "System.*". But my profiler is making the web application to crash.
"The process was terminated due to an internal error in the .NET Runtime at IP 000007F840A98CB6 (000007F840A20000) with exit code 80131506."
The error above was the collected from event viewer. I guess while calling the injected function definition the web application crashes. Can i know what is the reason for it.? how should i do it further ? how only should i instrument and call my helper function definition from the running web application.?
My reference project is is ILRewrite10 in http://clrprofiler.codeplex.com/releases/view/97738