How can we help you today? How can we help you today?

Castle ProxyGenerator + Line-level Profiling

I've been running into a problem trying to perform some profiling recently that used work just fine (at least I don't remember ever encountering this issue before...)

Since some time around .NET 4.5, Windows 7, Performance Profiler 8, and Castle 3.2.0... line level profiling results in a security exception trying to construct a DynamicProxy ProxyGenerator instance.

I don't think this was an issue before, but I really don't know when it became a problem. Everything works fine when using method level profiling, however, the moment I switch to line-level it breaks down and I end up with an unhandled exception that takes down the application.

Any help with this would be greatly appreciated!
bthomp2420
0

Comments

2 comments

  • dom.smith
    Hi,

    Could you try removing the Castle.Core namespace from line-level timings, please? You can do that by going to C:UsersXXXXXXXXXXAppDataLocalRed GateANTS Performance Profiler 8, and adding <assemblyName>Castle.Core</assemblyName> to the LineLevelBlacklist.xml file. If that doesn’t work it might be worth trying excluding the whole of Castle.

    For more information, please see https://documentation.red-gate.com/disp ... assemblies

    Thanks,
    Dom.
    dom.smith
    0
  • bthomp2420
    That worked! Thanks for the suggestion!
    bthomp2420
    0

Add comment

Please sign in to leave a comment.