unable to open page tab from content tree to preview page it says 404 not found

Muhammad Kaleem asked on March 5, 2019 13:56

i have register page builder in app_start as

ApplicationBuilder builder = ApplicationBuilder.Current;

    builder.UsePreview();

    builder.UsePageBuilder();

    i host my kentico mvc site to a domain and under the site node i add new app for admin-panel/cms now my domain url is abc.com which is working fine and admin-panel url is abc.com/admin admin panel is also working but when i open page tab to preview page from content tree it says "HTTP Error 404.0 - Not Found" how should can i handle this issue?

Recent Answers


David te Kloese answered on March 5, 2019 15:57

You say 'preview', do you mean an unpublished page?

If you get your custom pages data using the generated code you 'll need to implement your own extension to get unpublished pages using something like:

CMS.DocumentEngine.DocumentHelper.GetDocuments<YourCustomType>();

instead of:

CMS.DocumentEngine.DocumentHelper.GetDocuments<YourCustomType>().PublishedVersion().Published();

0 votesVote for this answer Mark as a Correct answer

Rui Wang answered on March 5, 2019 19:21

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.