I have installed servicestack MVC in a MVC4 app through nuget and trying to enable the mini profiler.
I have done as per the instructions the following in Global.asax:
protected void Application_BeginRequest(object src, EventArgs e)
{
if (Request.IsLocal)
ServiceStack.MiniProfiler.Profiler.Start();
}
protected void Application_EndRequest(object src, EventArgs e)
{
ServiceStack.MiniProfiler.Profiler.Stop();
}
And I placed the @ServiceStack.MiniProfiler.Profiler.RenderIncludes().AsRaw() in the layout page. However, this method does not exist in this reference. I can only see "ToHtmlString()" & "ToString()" in "@ServiceStack.MiniProfiler.Profiler.RenderIncludes()" which renders the html escaped. Has the "AsRaw()" method been removed in MVC4?
T.AsRaw() is an extension method in ServiceStack.Html.HtmlExtensions.AsRaw so you basically need to include the ServiceStack.Html namespace.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With