How do you profile a WCF service in IIS 7?
RazorKramer
Posts: 5
When I attempt to profile a WCF service in IIS 7, I only get system level methods in the trace window. Why don't I see my custom code getting called?
Comments
Additionally the profiling settings are really confusing. Basically you have to remember to reconfigure your client contract to use the TCP port you specified in ANTS Profiler's unused port setting or your client will be hitting the other copy of the website that is still hosted in IIS rather than the one hosted by Profiler.
Gets you every time.
Now when I call the service method in my WCF service which calls another class method that performs a Thread.Sleep for 4 seconds, I only see the System type of methods listed in the Method window. I would expect at this point to see my service class method and the other class method that contains the sleeper method to be listed, would that be an accurate assumption?
Another thing to note is when I call the service for the first time since starting ANTS, I do see a spike in the ANTS Processor Time graph which lists System methods and one thing of particular interest is a note entry within the Method window stating "Transition to managed code...". What the heck does that mean? Is that where I should see my managed code? I do have Profile Child Processes checked.
The other thing I'm a bit fuzzy on... if I was to have a web service at the following location http://localhost/MyWcfService/MyTestService.svc, do I provide http://localhost/MyWcfService/MyTestService.svc or http://localhost/MyWcfService in the application URL un the Application Settings?
I'm evaluating the product and not having the ability to affectively profile a web service is a deal breaker.
ANTS is on CPU Time and all I have is System type of methods in the Method window. What does draw my attention is that there is an entry labeled "Transition to managed code..." which feels like that is where the details are that I'm looking for. The problem is that message is very static and I can't expand it or nothing.
Any ideas?
There are a few things in the tree view that have no detail like "thread blocked" and "transition to managed code". This is not related to the problem.
Can you try turning all filters off? Ie: "hide insignificant methods" off, show "all threads" and "all methods" rather than "methods with source code".