简体   繁体   English

找不到页面:Episerver中的“页面ID”

[英]Page was not found : 'page id' in Episerver

I got below error while debugging the code: 调试代码时出现以下错误:

Exception Details: EPiServer.Core.PageNotFoundException: Page 6535 was not found 异常详细信息:EPiServer.Core.PageNotFoundException:未找到第6535页

Please suggest the appropriate solution 请提出适当的解决方案

Regards 问候

You are trying to get non-existent page. 您正在尝试获取不存在的页面。 You can check this code link 您可以检查此代码链接

new PageReference(int id)

Perhaps you need to create it in Edit-mode. 也许您需要在“编辑”模式下创建它。

You can get through the start page link 您可以通过起始页链接获得

ContentReference.StartPage

And then get all tree pages and see where missed. 然后获取所有树页面,并查看错过的地方。 http://tedgustaf.com/blog/2013/4/hide-pages-in-the-page-tree-in-episerver-7/ http://tedgustaf.com/blog/2013/4/hide-pages-in-the-page-tree-in-episerver-7/

如果在启动应用程序时发生这种情况,则意味着Episerver.config中的起始页已配置为该ID(并且不存在),或者您已为此ID配置了页面提供程序(但它不存在) 。

If you are getting this error as soon as you visit your page, just login and go directly to edit mode. 如果您在访问页面后立即收到此错误,只需登录并直接进入编辑模式即可。 It could be that your startpage is pointing to a page that has been deleted or something alike. 可能是您的首页指向的页面已被删除或类似。

So take your host and add /util/login.aspx That will take you to epi login. 因此,请托管您的主机并添加/util/login.aspx,这将使您进行Epi登录。 Once you are logged in, check your episerverframework.config (depends on which version you have but just try to find out the path to your cms) and see what kind of virtualpath the cms has. 登录后,检查您的episerverframework.config(取决于您使用的版本,但只是尝试查找cms的路径),并查看cms具有哪种虚拟路径。 Could be /Epiui/cms or something alike. 可以是/ Epiui / cms或类似名称。

You might need to add /edit or /admin depending on what you want to reach. 您可能需要添加/ edit或/ admin,这取决于要访问的内容。 But /edit should be your choice in this particular situation. 但是/ edit在这种情况下应该是您的选择。

Then check your startpage for missing pages to see what could be pointing to that page. 然后检查您的起始页中是否缺少页面,以查看可能指向该页面的内容。

It's a late answer but it might help you or someone else out :) 这是一个较晚的答案,但可能会帮助您或其他人:)

Do you already have a functioning website or is this a new installation? 您是否已经有一个运行正常的网站,或者这是一个新安装? If it's an existing one, go into Episerver's Edit mode (yoursite/episerver/cms/edit/) and use the search (top right of the screen with the magnifying glass icon) and enter the ID (6535) of the page that's missing, the page in question should appear in the search result. 如果已存在,请进入Episerver的“编辑”模式(yoursite / episerver / cms / edit /)并使用搜索(带有放大镜图标的屏幕右上方),然后输入缺少的页面的ID(6535),该页面应出现在搜索结果中。

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

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