Webjobs
tschlarm
Posts: 23 Bronze 2
Does ANTS PP work with line level timings of an Azure webjob? I have a relatively vanilla scheduled webjob (using async/await) and while calling:
HttpResponseMessage resp = await httpClient.PostAsync(<myurl>, content);
it throws:
I found an old reference to this in the forums about a Silverlight app that threw the same message.
https://forum.red-gate.com/discussion/77766/error-when-starting-silverlight-profiling-session
I don't want to blacklist the exe since that's what I'm trying to profile. I don't see [AllowPartiallyTrustedCallers] attribute in my code anywhere (unless it's implied by the webjobs SDK). And turning off the async awareness support and running it crashed ANTSPP (I submitted the report w/ my email).
dotTrace allows the task to run and profile just fine.
Any ideas?
HttpResponseMessage resp = await httpClient.PostAsync(<myurl>, content);
it throws:
Attempt by security transparent method 'System.Net.Http.HttpClient.FinishSendAsyncBuffered(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.
I found an old reference to this in the forums about a Silverlight app that threw the same message.
https://forum.red-gate.com/discussion/77766/error-when-starting-silverlight-profiling-session
I don't want to blacklist the exe since that's what I'm trying to profile. I don't see [AllowPartiallyTrustedCallers] attribute in my code anywhere (unless it's implied by the webjobs SDK). And turning off the async awareness support and running it crashed ANTSPP (I submitted the report w/ my email).
dotTrace allows the task to run and profile just fine.
Any ideas?
Answers
What I've found so far with ANTSPP v10.1.1067:
With async awareness enabled:
- Sample method level timings (inc framework): works
- Method-level timings (only methods with source): fails
- Line-level and method level: fails
- Method levels (inc framework): fails
- Line & Method level: fails
With async awareness disabled:
- Sample method level timings (inc framework): works
- Method-level timings (only methods with source): works
- Line-level and method level: fails
- Method levels (inc framework): works
- Line & Method level: fails
As for other profiler options everything checked except the 1st option (Record File i/O performance)
We'll look into this after we've gotten SA out of the door, but no ETA or promises I'm afraid.