问题
This only happens when using IE. An admin tries to upload a PDF in IE and we get this error.
An error occurred when saving data. Please see event log for more details. Message: [TreeNode.InsertInternal]: Document culture 'en-CA' is not allowed on site 'KFFIntranet'.
Exception type: System.Exception Stack Trace: at CMS.DocumentEngine.TreeNode.InsertInternal(TreeNode parent) at CMS.DocumentEngine.TreeNode.Insert(TreeNode parent, Boolean useDocumentHelper) at CMS.DocumentEngine.DocumentHelper.InsertDocument(TreeNode node, TreeNode parentNode, TreeProvider tree, Boolean allowCheckOut) at CMSModules_Content_CMSDesk_New_NewFile.ProcessDirectUploader() in d:\Build\1\CMS\Intranet_Trunk\Sources\CMS\CMSModules\Content\CMSDesk\New\NewFile.aspx.cs:line 470 at CMSModules_Content_CMSDesk_New_NewFile.DocumentManager_OnSaveData(Object sender, DocumentManagerEventArgs e) in d:\Build\1\CMS\Intranet_Trunk\Sources\CMS\CMSModules\Content\CMSDesk\New\NewFile.aspx.cs:line 313 at CMS.FormControls.CMSAbstractManager`2.RaiseSaveData(EventArgsType args) at CMS.FormControls.CMSDocumentManager.SaveDocumentInternal(String actionContext)
The site cultutre is US English, but we're in Canada. I didn't set up the culture as en-ca as there is only english and there's no need.
As this doesn't give an error in Chrome, is seems like IE is passing the computer culture to Kentico.
Adding en-ca as a culture isn't an option as it will just cause confusion to the admins.
来源:https://stackoverflow.com/questions/43240186/kentico-culture-error-when-uploading-a-file