Kentico 12 MVC - error message when trying to add new page based on page type

enterprise procurement asked on October 27, 2022 18:26

Hi All,

I'm unable to create a page in kentico content tree based on custom page type, due to an run time error "CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource."

I am able to see the existing pages, but all of sudden when user want to add new page, he is getting the above error message.

I tried all the best possible solution to make it work but nothing work for me, if any one having any clue why this is happening kindly share your opinion.

Environment information: Kenitco Version 12.0.35

Recent Answers


Juraj Ondrus answered on October 28, 2022 06:24

Are you using SSL on both admin app as well as live site app? Also, you need to set the SameSite mode. Modern browsers block communication if not SSL and SameSite.

0 votesVote for this answer Mark as a Correct answer

enterprise procurement answered on October 28, 2022 17:34

Thanks for the feedback, as for your question we are not using SSL on both sites, the SSL only implemented on the live site not on staging.

I addeed the IIS rewrite rule and the Httpcookie, but none of them solved the issue, so if user is trying to add new page, he still gets same error message. and other advise? any idea?

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on October 31, 2022 05:08

I would recommend adding a valid SSL certificate - modern browsers block the communication between the domains in these cases.

0 votesVote for this answer Mark as a Correct answer

enterprise procurement answered on November 2, 2022 15:54

thank you Juraj, appreciate the reply, we are waiting to get the certificate so hopefully once we have that, this will be resolved. I will keep you updated.

0 votesVote for this answer Mark as a Correct answer

enterprise procurement answered on December 19, 2022 18:13

Update: we finally added the SSL certificate, but the issue when trying to add new pages still exist, that SSL DID NOT resolved the issue, we still get the "An error occurred while attempting to retrieve page templates. Contact your system administrator and check that the page builder feature is registered correctly in the MVC project."

Anyone else has any advise??

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on December 20, 2022 05:04

What are the exact steps to reproduce the issue on an out of the box Kentico installation? I would try applying latest hotfix and check what were the most recent changes before this started.

0 votesVote for this answer Mark as a Correct answer

enterprise procurement answered on December 20, 2022 19:35 (last edited on December 20, 2022 20:54)

what do you mean out of the box?? this is a full enterprise licensed installation of Kentico MVC version 12.0.35 we are using custom mvc templates.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on December 21, 2022 05:17

Out of the box I mean with no custom code. Using sample Dancing Goat MVC project. The error is coming from the front end MVC app so I assume something is not coded well there. But we do not have nor know your MVC app - we need to know the steps how to reproduce the issue using the default installation and sample project as this is what we have available.

0 votesVote for this answer Mark as a Correct answer

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