这个问题可能是由于 BVN404 gadget 没有正确注册到 EpiServer 引起的。可以使用以下示例代码在 EpiServer 中手动注册 gadget:
在 Global.asax.cs 文件中注册 gadget:
using System; using System.Web.Routing; using BVN404;
namespace EpiServerIntegration { public class Global : EPiServer.Global { void Application_Start(object sender, EventArgs e) { // 注册 BVN404 gadget RouteTable.Routes.MapPageRoute("BVN404", "gadgets/BVN404", "~/Gadgets/BVN404.aspx"); } } }
上面的代码将 BVN404 gadget 注册为 http://localhost:port/gadgets/BVN404。
如果 gadget 仍然无法显示,在页面中添加以下标记:
<%@ Register Assembly="BVN404" Namespace="BVN404.Gadgets" TagPrefix="bvn" %>
然后添加以下代码以在页面中使用 gadget:
最后,将 BVN404.dll 拷贝到 EpiServer 网站的 bin 文件夹中。
完成以上步骤之后,BVN404 gadget 应该能够在 EpiServer 集成环境中正常显示。