Does OA Profiler supports WinForms?

2 posts, 0 answers
  1. KulasEye
    KulasEye avatar
    1 posts
    Member since:
    Jul 2010

    Posted 05 Mar 2013 Link to this post

    Hi,

    I'm new to OpenAccess and wanted to get the profiler working for WinForms. Is this possible? all I see in the web is how to do this for web applications.

    Best!

  2. Boris Georgiev
    Admin
    Boris Georgiev avatar
    190 posts

    Posted 08 Mar 2013 Link to this post

    Hello,

    Yes, you could use Telerik OpenAccess Profiler with WinForms. You can do that in two different ways: real-time monitoring and offline monitoring.

    For using the OpenAccess Profiler in a real-time monitoring, take a look at this article.
    Note that the monitoring is implemented via the web services and for WinForms you should start the web service host from the application:
    Telerik.OpenAccess.ServiceHost.ServiceHostManager.StartProfilerService(15555);

    We would recommend you to start the web services at the beginning of the application and stop it after the application exit:
    01.static void Main()
    02.{
    03.    ...
    04.     
    05.    Application.EnableVisualStyles();
    06.    Application.SetCompatibleTextRenderingDefault(false);
    07.    InitializeService();
    08.    Application.Run(new Form1());
    09.     
    10.    ...
    11.}
    12. 
    13.public static void InitializeService()
    14.{
    15.    Telerik.OpenAccess.ServiceHost.ServiceHostManager.StartProfilerService(15555);
    16. 
    17.    Application.ApplicationExit += (s, a) =>
    18.    {
    19.        Telerik.OpenAccess.ServiceHost.ServiceHostManager.StopProfilerService();
    20.    };
    21.}


    If you don't want to use a real-time monitoring, this article will show you how to configure your project for offline monitoring.
     
    Greetings,
    Boris Georgiev
    the Telerik team
    OpenAccess ORM Q1 2013 is out featuring Multi-Diagrams, Persistent Data Stream Support and much more. Check out all of the latest highlights.
  3. DevCraft banner
Back to Top