Glimpse Not working at all

做~自己de王妃 提交于 2019-12-12 10:55:19

问题


I installed Glimpse for MVC5 via Install-Package Glimpse.MVC5

I turned on Glimpse on the Glimpse config page: /Glimpse.axd

When try to now hit my site, nothing happens. If I turn off Glimpse the site works as expected.

There are no error message or anything http related in Chrome network tools, only a request of: data:text/html,chromewebdata with a response of "Failed to load response data"

This is what Glimpse put in my web.config when I installed it. Not sure how to troubleshoot this.

<httpModules>
  <add name="Glimpse" type="Glimpse.AspNet.HttpModule, Glimpse.AspNet" />
</httpModules>
<httpHandlers>
  <add path="glimpse.axd" verb="GET" type="Glimpse.AspNet.HttpHandler, Glimpse.AspNet" />
</httpHandlers>

<modules>
  <add name="Glimpse" type="Glimpse.AspNet.HttpModule, Glimpse.AspNet" preCondition="integratedMode" />

<handlers>
  <add name="Glimpse" path="glimpse.axd" verb="GET" type="Glimpse.AspNet.HttpHandler, Glimpse.AspNet" preCondition="integratedMode" />

回答1:


After adding the Glimpse.AspNet NuGet package, I found that the ASP.NET Development Server was crashing on every request because Glimpse was throwing a NotSupportedException (I only found this after attaching a debuger to the dev server process). The exception's message said:

Some environments conflict with current Glimpse async support. Please set Glimpse:DisableAsyncSupport = true in Web.config, or see https://github.com/Glimpse/Glimpse/issues/632 for more details.

After reading through the GitHub issue, I added this to the appSettings section of my web.config file to get everything working:

<appSettings>
    <add key="Glimpse:DisableAsyncSupport" value="true" />
<appSettings>

See: Glimpse Issue: Allow users to disable use of Logical Call Context #632




回答2:


Just needed to set dynamicCompressionBeforeCache to false and it works:

<urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="false" />



回答3:


Another alternative, instead of simply turning off compression, is to use the @Html.GlimpseClient() Razor Helper right before the </body> tag in your HTML.

The troubleshooting section of the Glimpse documentation covers how to do this.



来源:https://stackoverflow.com/questions/24715337/glimpse-not-working-at-all

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!