【发布时间】:2017-02-16 08:45:48
【问题描述】:
我正在尝试解决这个问题。
我有两个指向 elb1 的 cdn url abc.com 和指向 elb2 的 def.com。
elb(elb1 和 elb2)都指向负载均衡的相同 ec2 实例(ec2-A 和 ec2-B)
我可以登录到从 abc.com 导航的服务器 但我无法登录到从 def.com 导航的服务器
def.com 登录出现以下错误。
因为两个 dns 都指向同一个 EC2。 Web.config 文件相同。
Message: CSRF attack detected.
Exception type: CMS.Protection.Web.UI.CsrfException
Stack trace:
at CMS.Protection.Web.UI.CsrfProtection.ThrowCsrfException(Exception innerException)
at CMS.Protection.Web.UI.CsrfProtection.OnPostMapRequestHandlerExecute(Object sender, EventArgs eventArgs)
at CMS.Base.AbstractHandler.CallEventHandler[TArgs](EventHandler`1 h, TArgs e)
at CMS.Base.AbstractHandler.Raise[TArgs](String partName, List`1 list, TArgs e, Boolean important)
at CMS.Base.SimpleHandler`2.RaiseExecute(TArgs e)
at CMS.Base.SimpleHandler`2.RaiseExecute(TArgs e)
at CMS.Base.SimpleHandler`2.StartEvent(TArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Message: Error occurred during a cryptographic operation.
Exception type: System.Security.Cryptography.CryptographicException
Stack trace:
at System.Web.Security.Cryptography.HomogenizingCryptoServiceWrapper.HomogenizeErrors(Func`2 func, Byte[] input)
at CMS.Protection.Web.UI.CsrfProtection.OnPostMapRequestHandlerExecute(Object sender, EventArgs eventArgs)
【问题讨论】:
-
您似乎是从外部网站发送帖子请求
-
好像 machineKeys 不匹配。看看这个:docs.kentico.com/k10/configuring-kentico/…你能指定你使用的 HF 版本吗?
-
最新的 kentico 10
-
您是否使用自动生成的加密密钥 (machineKey)?按照上一条评论中链接的文档中描述的步骤进行操作后,您能否确认问题仍然存在?
-
是的,它是自动生成的,但根据上面的评论,我再次生成,我在 web.config 中看到了机器密钥部分
标签: asp.net .net amazon-ec2 cdn kentico