Cannot save edited template because of error 500

Bobby Ortega asked on August 13, 2015 01:17

Dear mates,

I recently had an problem saving my edited templates. I did not touch anything. I just edited template and it won't allow me to save.

Image Text Image Text

Recent Answers


Virgil Carroll answered on August 13, 2015 03:41

Just looking at the error you are seeing, I would assume there is something wrong with the structure of the layout that is causing the error. I would open up your layout in an HTML editor and see if you see any malformed tags that Kentico is construing as potentially malicious.

Kentico has a lot of code inside of it to prevent different types of penetration attacks through malicious code, so I have a feeling something in the layout is being seen as that.

0 votesVote for this answer Mark as a Correct answer

Bobby Ortega answered on August 13, 2015 03:57 (last edited on August 13, 2015 03:58)

Thank you for your input Virgil, but upon further testing I found out that all html markups wont allow me to save the template. But when I just put plain text string it saves.

Image Text Image Text Image Text

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on August 13, 2015 09:39

Looks like your solution is trying to prevent SQL injection. What .NET version are you using?

Might want to try adding:

<httpRuntime requestValidationMode="2.0" />

to the web.config in your solution machine might help you to save your template.

http://www.asp.net/whitepapers/aspnet4/breaking-changes#0.1__Toc256770147

2 votesVote for this answer Mark as a Correct answer

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