Profiler and Tuning Advisor for Silverlight App?

Thread is closed for posting
2 posts, 0 answers
  1. Garrett
    Garrett avatar
    23 posts
    Member since:
    Sep 2012

    Posted 15 Jul 2011 Link to this post

    Hi,

    I'm trying to figure out how to attach the OA Profiler to a Silverlight4/Web app for real-time monitoring.

    The tutorial (located here: http://www.telerik.com/help/openaccess-orm/openaccess-profiler-how-to-configure-project-real-time-profiling.html)

    ...does not work correctly when trying to attach it to the web application. After following the directions exactly, I get this error:

    "Error    2    'Telerik.OpenAccess.ServiceHost.ServiceHostManager.StartProfilerService(int)' is a 'method' but is used like a 'type'    C:\Users\Garrett\documents\visual studio 2010\projects\RadControlsSilverlightApp4\RadControlsSilverlightApp4.Web\Class1.cs    11    59    RadControlsSilverlightApp4.Web"

    Here is my code:
    namespace RadControlsSilverlightApp4.Web
    {
        public class Class1
        {
            Telerik.OpenAccess.ServiceHost.ServiceHostManager.StartProfilerService(15555);
        }
    }

    Is what I'm doing not possible?

    Thanks,

    Garrett
  2. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 15 Jul 2011 Link to this post

    Hi Garrett,

    As it is mentioned in the help article, the best place to start and stop the server is the Global class and its Application_Start and Application_End methods. If you do not have this class in your project already, you can add it from the project's context menu -> Add -> New Item and then select the Global Application Class template from the Web category.
    The last thing you need to do is call the StartProfilerService and StopProfilerService methods. At the end the Global class should look like this:
    public class Global : System.Web.HttpApplication
    {
     
        protected void Application_Start(object sender, EventArgs e)
        {
            Telerik.OpenAccess.ServiceHost.ServiceHostManager.StartProfilerService(15555);
        }
     
        protected void Session_Start(object sender, EventArgs e)
        {
     
        }
     
        protected void Application_BeginRequest(object sender, EventArgs e)
        {
     
        }
     
        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {
     
        }
     
        protected void Application_Error(object sender, EventArgs e)
        {
     
        }
     
        protected void Session_End(object sender, EventArgs e)
        {
             
        }
     
        protected void Application_End(object sender, EventArgs e)
        {
            Telerik.OpenAccess.ServiceHost.ServiceHostManager.StopProfilerService();
        }
    }

    Hope that helps.

    Best wishes,
    Alexander
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Back to Top