如何在Orchard CMS中使用瞥见 [英] How to use Glimpse in Orchard CMS

查看:83
本文介绍了如何在Orchard CMS中使用瞥见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Orchard CMS的新手. 我想在果园cms中使用Glimpse并将其配置为快速入门,但是当我转到 http://localhost:30320/OrchardLocal/glimpse.axd 它显示错误消息找不到资源"

I'm new to Orchard CMS. I want to use Glimpse in Orchard cms and config it as quick start, but when I go to http://localhost:30320/OrchardLocal/glimpse.axd it show error message "The resource cannot be found"

任何人都知道如何解决它,请告诉我.谢谢!

Anyone know how to resolve it, please show me. Thanks!

推荐答案

您需要修改Orchard.Web文件夹中的web.config.如果使用NuGet安装了Glimpse,它将在web.config中添加两个设置,以告诉Web服务器使用Glimpse来处理glimpse.axd资源.

You need to modify the web.config in the Orchard.Web folder. If you installed Glimpse using NuGet, it added two settings to the web.config to tell the web server to use Glimpse to handle the glimpse.axd resource.

问题是Orchard.Web \ web.config文件的<httpHandlers><handlers>部分都包含一个catch all处理程序以默认情况下阻止所有资源,并且Glimpse设置在之后添加抓住一切.您只需要移动瞥见条目即可在全部捕获之前显示.

The problem is the Orchard.Web\web.config file's <httpHandlers> and <handlers> sections both include a catch all handler to block all resources by default, and the Glimpse settings get added after the catch alls. You just need to move the glimpse entries to appear before the catch alls.

<httpHandlers>部分中,对此进行更改:

In <httpHandlers> section, change from this:

<httpHandlers>
...
  <add path="*" verb="*" type="System.Web.HttpNotFoundHandler" />
  <add path="glimpse.axd" verb="GET,POST" type="Glimpse.Core.Handler" />
</httpHandlers>

对此:

<httpHandlers>
  ...
  <add path="glimpse.axd" verb="GET,POST" type="Glimpse.Core.Handler" />
  <add path="*" verb="*" type="System.Web.HttpNotFoundHandler" />
</httpHandlers>

接下来,在<handlers>部分中,对此进行更改:

Next, in <handlers> section, change from this:

<handlers accessPolicy="Script,Read">
  ...
  <add name="NotFound" path="*" verb="*" type="System.Web.HttpNotFoundHandler" preCondition="integratedMode" requireAccess="Script" />
  <add name="Glimpse" path="glimpse.axd" verb="GET,POST" type="Glimpse.Core.Handler,Glimpse.Core" preCondition="integratedMode" />
</handlers>

对此:

<handlers accessPolicy="Script,Read">
  ...
  <add name="Glimpse" path="glimpse.axd" verb="GET,POST" type="Glimpse.Core.Handler,Glimpse.Core" preCondition="integratedMode" />
  <add name="NotFound" path="*" verb="*" type="System.Web.HttpNotFoundHandler" preCondition="integratedMode" requireAccess="Script" />
</handlers>

这篇关于如何在Orchard CMS中使用瞥见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆