I have WCF service with per session service mode and using WIF for authentication/authorization. But some of the clients is making channels leak.
Is there a way to see which client is leaking using memory dump and windbg? I cannot use clients IP address because more then one client is coming from the same IP. User identity can be useful but I cannot find connection between leaked service instance and ClaimIdentity used.
The following WinDbg can help you find the leaking channels:
This will show a list of all of the instances of a particular type. Once you identify the leaking object
This will let you inspect the object and it's properties. This way you might be able to get the ClaimId used for this channel
This will let you know what object is keeping the leaking object in memory and help you fix it. This sounds more useful than actually identifying the client since it seems more likely to be an issue with your server code.
Other useful commands
That said, I've to recommend RedGate's memory profiler. It has come a long way in the last couple of years to identify Memory Leaks. You can get a 14 day trial.