Database Connection Issue While Profiling
JasonBock
Posts: 10 Bronze 2
I'm new to ANTS so I may be doing something wrong that's easy to fix....but I tried doing a profiling session for a .NET Framework-based Web API hosted under IIS (all local testing for now). The profiling session starts up, but when I start calling my APIs, I keep getting a database connection error. If I don't have the profiler hooked in, the call works successfully. Any ideas why this would be happening?
Tagged:
Best Answer
-
AlexanderMz Posts: 4 Bronze 1@JasonBock for the latter exception, find LineLevelBlacklist.xml file (%LocalAppData%\Red Gate\ANTS Performance Profiler 10\LineLevelBlacklist.xml) and put the following line there:<assemblyName>System.Net.Http</assemblyName>
Answers
If I don't use the same account used for the app pool that the API runs under, I get this error (the REDACTED is client-specific info):
Login failed for user 'REDACTED$'.
If I use the same account used for the app pool that the API runs under, I get this error:
[MethodAccessException]: Attempt by security transparent method 'System.Net.Http.HttpClient.FinishSendAsync(System.Threading.Tasks.Task`1<System.Net.Http.HttpResponseMessage>, System.Net.Http.HttpRequestMessage, System.Threading.CancellationTokenSource, Boolean)' to call native code through method '<Module>._ANTS_Begin_Async()' failed. Methods must be security critical or security safe-critical to call native code.
So....not sure where to go from here. Any other ideas? Or am I not setting the profiling session up correctly?