ANTS Memory Profiler 10

Silverlight out-of-browser profiling stops with no results

With the release of 10.1, we have officially removed support for Microsoft Silverlight due to its deprecation and lack of support in modern browsers. To use ANTS Memory Profiler with Silverlight applications, please downgrade to ANTS Memory Profiler 10.0.

You can't profile Silverlight applications running in out-of-browser mode on computers with security fix MS15-049 installed. For more information, see Silverlight out-of-browser profiling causes ANTS Performance & Memory Profilers to crash.

When profiling an out-of-browser Silverlight application, the profiling session may stop soon after it starts, leaving the application still running. The following message or similar will appear in the ANTS Memory Profiler log file:

[Profiler pipe monitor] WARN RedGate.Profiler.Engine.Startup.Basic.PipeConnection - Rejected a connection attempt from process ID 0x978 'C:\Program Files (x86)\Microsoft Silverlight\sllauncher.exe'

Microsoft had released a security patch to Silverlight in October 2011 that changed the way the out-of-browser Silverlight launcher starts and connects to the profiling API. The sllauncher.exe process seems to Profiler as if it starts and exits immediately, and a new process appears that Profiler will not allow to connect.

Until this problem can be addressed there is a workaround available, which is to profile cmd.exe and launch the Silverlight application in a console session.

  1. Instead of selecting the option to profile a Silverlight application, use the option to profile a .NET executable.
  2. Ensure the profile child processes option is enabled
  3. Set the executable as c:\windows\system32\cmd.exe
  4. Set the arguments to be /K ""c:\program files (x86)\microsoft silverlight\sllauncher.exe"/emulate:"c:\YourOOBAppFolder\YourOOBApp.xap" /origin:"c:\YourOOBAppFolder" /overwrite"
    Where "YourOOBApp" is the folder the XAP resides in and "YourOOBApp.xap" is the out-of-browser Silverlight application

The /K option to cmd will keep the console session and allow ANTS Memory Profiler to attach to any process started in the console session.

Didn't find what you were looking for?