MVC4 + ServiceStack +....Glimpse?

Jeremy Smith

I'm running ServiceStack v4 under /api in my MVC4 application. I'd like to have Glimpse profile my SQL queries. My SQL tab is disabled in the HUD.

SQL tab disabled in Glimpse HUD

Any idea how to configure this?

Jeremy Smith

The solution I chose was to override the SqlServerOrmLiteDialectProvider.CreateDbConnection()similar to this solution.

var dbFactory = new OrmLiteConnectionFactory(
                "<connection string>",
                SqlServerWithGlimpseDialectProvider.Instance);


public class SqlServerWithGlimpseDialectProvider 
    : SqlServerOrmLiteDialectProvider
{
    public new static SqlServerWithGlimpseDialectProvider Instance = new SqlServerWithGlimpseDialectProvider();

    public override IDbConnection CreateConnection(string connectionString, Dictionary<string, string> options)
    {
        return new GlimpseDbConnection(
            base.CreateConnection(connectionString, options) as System.Data.SqlClient.SqlConnection);
    }
}

SQL now profiling:

enter image description here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

MVC4 and ServiceStack session in Redis

From Dev

MVC4 and ServiceStack session in Redis

From Dev

Error calling ServiceStack service with mvc4 Controller

From Dev

How do I get ServiceStack to work in an MVC4 project?

From Dev

Reconnecting to Servicestack session in an asp.net MVC4 application

From Dev

How do I get ServiceStack to work in an MVC4 project?

From Dev

Session without authentication with MemoryCacheClient in servicestack with MVC4

From Dev

Glimpse + MVC5 + Sitecore 7.2

From Dev

What is the correct way to add Glimpse to a MVC project that references an EF project?

From Dev

What is the correct way to add Glimpse to a MVC project that references an EF project?

From Dev

ServiceStack AutoQuery MVC controller

From Dev

ServiceStack AutoQuery MVC controller

From Dev

NHibernate.Glimpse overrides log4net

From Dev

Upgrading to serviceStack 4

From Dev

ServiceStack 4 new licensing

From Dev

ServiceStack - Validation not firing in MVC Action

From Dev

Resolving ServiceStack Services in MVC Controllers

From Dev

Servicestack: restrict MVC action by role

From Dev

ServiceStack - Validation not firing in MVC Action

From Dev

Servicestack: restrict MVC action by role

From Dev

Razor dependency issues in ServiceStack 4

From Dev

ServiceStack 3.9.* to 4.*

From Dev

ServiceStack 3.9.* to 4.*

From Dev

Persistent ServiceStack Authentication from MVC 4 Forms Authentication

From Dev

Eventhandler in MVC4

From Dev

Eventhandler in MVC4

From Dev

How to display timeline information for routines used by controllers in glimpse/Asp.NET MVC

From Dev

How to display timeline information for routines used by controllers in glimpse/Asp.NET MVC

From Dev

How to disable Tracing within a MVC Asp.Net application using Trace.WriteLine and Glimpse?

Related Related

  1. 1

    MVC4 and ServiceStack session in Redis

  2. 2

    MVC4 and ServiceStack session in Redis

  3. 3

    Error calling ServiceStack service with mvc4 Controller

  4. 4

    How do I get ServiceStack to work in an MVC4 project?

  5. 5

    Reconnecting to Servicestack session in an asp.net MVC4 application

  6. 6

    How do I get ServiceStack to work in an MVC4 project?

  7. 7

    Session without authentication with MemoryCacheClient in servicestack with MVC4

  8. 8

    Glimpse + MVC5 + Sitecore 7.2

  9. 9

    What is the correct way to add Glimpse to a MVC project that references an EF project?

  10. 10

    What is the correct way to add Glimpse to a MVC project that references an EF project?

  11. 11

    ServiceStack AutoQuery MVC controller

  12. 12

    ServiceStack AutoQuery MVC controller

  13. 13

    NHibernate.Glimpse overrides log4net

  14. 14

    Upgrading to serviceStack 4

  15. 15

    ServiceStack 4 new licensing

  16. 16

    ServiceStack - Validation not firing in MVC Action

  17. 17

    Resolving ServiceStack Services in MVC Controllers

  18. 18

    Servicestack: restrict MVC action by role

  19. 19

    ServiceStack - Validation not firing in MVC Action

  20. 20

    Servicestack: restrict MVC action by role

  21. 21

    Razor dependency issues in ServiceStack 4

  22. 22

    ServiceStack 3.9.* to 4.*

  23. 23

    ServiceStack 3.9.* to 4.*

  24. 24

    Persistent ServiceStack Authentication from MVC 4 Forms Authentication

  25. 25

    Eventhandler in MVC4

  26. 26

    Eventhandler in MVC4

  27. 27

    How to display timeline information for routines used by controllers in glimpse/Asp.NET MVC

  28. 28

    How to display timeline information for routines used by controllers in glimpse/Asp.NET MVC

  29. 29

    How to disable Tracing within a MVC Asp.Net application using Trace.WriteLine and Glimpse?

HotTag

Archive