Excluded URLs are not really excluded?

Don Rea asked on December 15, 2021 18:21

I am trying to add a simple aspx page to the server running our Kentico 11 site, outside of the CMS. I have added the path to the Settings > URLs and SEO > URL format > Excluded URLs field. According to https://docs.xperience.io/k11/configuring-kentico/configuring-page-urls this means Kentico will "Delegate request to the standard ASP.NET process". However, when I request the page via HTTPS, I am presented with the Kentico system error page and the Event Log records a CMS.Protection.Web.UI.CsrfException.

Is there any way to actually have a page on the server, at the same IP address, that is completely outside the CMS?

[EDIT: additional information] If it matters, the virtual path in the IIS site is off the root level, and the actual path in the file system is outside the CMS directory.

Recent Answers


Juraj Ondrus answered on December 16, 2021 08:46

So, when using HTTP it works fine? What is the hotfix you are using? And how is the SSL configured in your Kentico instance?

0 votesVote for this answer Mark as a Correct answer

Don Rea answered on December 16, 2021 15:15

I'm sorry, I was unclear. The behavior is the same for HTTP; I only mentioned HTTPS because that's the protocol this endpoint will be using.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on December 17, 2021 06:02

Thanks, and one more thing to clarify: where is the physical file located on disk? I am not sure I understood the edit on your post. If it is completely outside of the CMS folder, then it should not be necessary to exclude it at all since Kentico does not know it (assuming that the CMS folder is set as the site's home directory). What is the hotfix? I think there was a bug in some older versions too.

I just tested a simple HTML page and it is working fine even without excluding it. I think I am missing some detail here how to reproduce the issue.

0 votesVote for this answer Mark as a Correct answer

Don Rea answered on December 20, 2021 20:47

The directory outside the CMS directory is a virtual directory of the IIS site. I'm afraid I don't know enough about Kentico yet to understand what you mean by "what is the hotfix?"

I've actually solved this problem by just creating a whole different site with a different hostname, and just reading the connection strings from web.config from there using Linq to XML.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on December 21, 2021 05:21

When we release a new version, it is usually a major version of the software - Kentico 10, 11, 12, 13....However, as each software, there are also bugs. So, we try to fix them within 7-days and we are releasing hotfixes, which are fixing the issues. So, after you apply the hotfix, you will get a minor version number like 11.0.35 - where 35 is the number of the hotfix. This can tell us what bugs were already fixed and what not. This is very helpful in many cases.

0 votesVote for this answer Mark as a Correct answer

Don Rea answered on December 21, 2021 16:06

Thank you for clarifying that!

0 votesVote for this answer Mark as a Correct answer

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