This is a migrated thread and some comments may be shown as answers.

Profiler

3 Answers 109 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael
Top achievements
Rank 2
Michael asked on 25 Jul 2011, 10:00 AM
I managed to setup profiler with MVC+OAORM+PostgreSQL, and everything is OK. I have just one long running query and that's ok. My question is : when I compile App for client what i should do with that Partial class for profiler setup?

3 Answers, 1 is accepted

Sort by
0
Accepted
Jan Blessenohl
Telerik team
answered on 26 Jul 2011, 05:12 PM
Hi Michael,
You can use something similar to my code reading the port settings from the web.config file:

public static Exception StartProfilerService(string name)
{
    try
    {
        string value = ConfigurationManager.AppSettings[name];
        if (value != null)
        {
            int port = Int32.Parse(value);
            return StartProfilerService(port);
        }
        return null;
    }
    catch (Exception exc)
    {
        return exc;
    }
}

If the port is not available in the web.config, just do not apply the additonal settings to the backend configuration, if it is there it will change your settings and start the server process.

All the best,
Jan Blessenohl
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!

0
Michael
Top achievements
Rank 2
answered on 01 Aug 2011, 11:59 AM
Hi Jan,

I managed to do something similar to your code. I just wondering is there some property or something else to tell profiler to do nothing during runtime!
0
Alexander
Telerik team
answered on 04 Aug 2011, 09:58 AM
Hello Michael,

When you want to profile your application you have to do two things - enable the logging in the backend configuration and start the service, which sends the log data to the profiler. The code above handles only the start of the service, but the logging will still be active the whole time. So if you do not want your application to produce any log data on the client's machine, you could also disable the logging in the backend configuration before shipping the application.

All the best,
Alexander
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
General Discussions
Asked by
Michael
Top achievements
Rank 2
Answers by
Jan Blessenohl
Telerik team
Michael
Top achievements
Rank 2
Alexander
Telerik team
Share this question
or