Skip to content
This repository has been archived by the owner on May 16, 2022. It is now read-only.

Glimpse Integration #45

Closed
neuecc opened this issue Feb 12, 2015 · 1 comment
Closed

Glimpse Integration #45

neuecc opened this issue Feb 12, 2015 · 1 comment

Comments

@neuecc
Copy link
Owner

neuecc commented Feb 12, 2015

I found run glimpse on OWIN(only on Microsoft.Owin.Host.SystemWeb)

// through LightNode
app.MapWhen(x => !x.Request.Path.Value.StartsWith("/glimpse.axd", StringComparison.OrdinalIgnoreCase), x =>
{
    x.UseLightNode();
});

// hacks, glimpse HttpModule handle end on PostReleaseRequestState
// but Microsoft.Owin.Host.SystemWeb not handle PostReleaseRequestState
// manualy call EndRequest
public class GlimpseHackMiddleware : OwinMiddleware
{
    public GlimpseHackMiddleware(OwinMiddleware next)
        : base(next)
    {

    }

    public override Task Invoke(IOwinContext context)
    {
        var ctx = HttpContext.Current;
        return Next.Invoke(context).ContinueWith(_ =>
        {
            (ctx.Application["__GlimpseRuntime"] as IGlimpseRuntime).EndRequest();
        });
    }
}

I make more glimpse information tab/timeline like Glimpse.Mvc.

@neuecc
Copy link
Owner Author

neuecc commented Feb 16, 2015

done - I've released 1.0.0 and Glimpse.LightNode package on NuGet.

@neuecc neuecc closed this as completed Feb 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant