3

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?

4

1 回答 1

4

T.AsRaw()ServiceStack.Html.HtmlExtensions.AsRaw中的扩展方法,因此您基本上需要包含ServiceStack.Html命名空间。

于 2013-06-25T18:42:26.437 回答