简体   繁体   English

BVN404 小工具在本地开发中显示,但在 EpiServer 集成环境中不显示

[英]BVN404 gadget showing in local dev, but not EpiServer integration enviornment

I am able to access this gadget in my local dev environment, but not integration, as you can see below:我可以在我的本地开发环境中访问这个小工具,但不能集成,如下所示:

Local dev:本地开发:

在此处输入图像描述

Integration:一体化:

在此处输入图像描述

I double checked the BVN settings from here: https://github.com/Geta/404handler#configuration .我从这里仔细检查了 BVN 设置: https://github.com/Geta/404handler#configuration They are setup like this in my web.config:它们在我的 web.config 中是这样设置的:

<section name="bvn404Handler" type="BVNetwork.NotFound.Configuration.Bvn404HandlerConfiguration, BVNetwork.EPi404" />

<episerver.shell>
    <publicModules rootPath="~/modules/" autoDiscovery="Modules" />
    <protectedModules rootPath="~/EPiServer/">
        <add name="BVNetwork.404Handler" />

<bvn404Handler handlerMode="On">
    <providers>
        <add name="Custom Handler" type="CompanyName.Business.CustomPageNotFoundHandler, companyname-cms" />
    </providers>
</bvn404Handler>

There is not a securedComponents section, though I did try to add one with allowedRoles="Administrator" , allowedRoles="*" , and allowedRoles="Everyone" for testing purposes.没有securedComponents部分,尽管我确实尝试添加一个带有allowedRoles="Administrator"allowedRoles="*"allowedRoles="Everyone"的部分用于测试目的。

Any ideas why the gadget can't be viewed when published?为什么小工具在发布时无法查看的任何想法?

The issue was that the BVN zip file did not publish to the modules folder for some reason.问题是 BVN zip 文件由于某种原因没有发布到模块文件夹。 After adding it back, it worked as expected.添加回来后,它按预期工作。

在此处输入图像描述

Nuget installations sometimes misses the protectedmodules section Nuget 安装有时会错过 protectedmodules 部分

Ensure the BVNetwork.404Handler is in your protectedModules collection in web.config.确保BVNetwork.404Handler中的 protectedModules 集合中。 Nuget sometimes miss that. Nuget 有时会错过。

<episerver.shell>
    <protectedModules rootPath="~/EPiServer/"> <!-- this line may vary -->
        <!-- other modules -->
        <add name="BVNetwork.404Handler" />
    </protectedModules>
</episerver.shell>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM