您的位置:首页 > 其它

DotNetNuke 出现 CryptographicException

2008-06-18 17:25 330 查看
今天安装完DNN后,访问主页,然后点击登录页面,输入Host和密码后,突然发生错误。

在事件日志中发现一下错误:

Exception information: Exception type: CryptographicException Exception message: Bad Data.

Thread information: Thread ID: 19 Thread account name: WEBTESTSER/ASPNET Is impersonating: False Stack trace: 在 System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr) 在 System.Security.Cryptography.Utils._DecryptData(SafeKeyHandle hKey, Byte[] data, Int32 ib, Int32 cb, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode PaddingMode, Boolean fDone) 在 System.Security.Cryptography.CryptoAPITransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) 在 System.Security.Cryptography.CryptoStream.FlushFinalBlock() 在 System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo) 在 System.Web.Security.FormsAuthentication.Decrypt(String encryptedTicket) 在 DotNetNuke.HttpModules.Membership.MembershipModule.OnAuthenticateRequest(Object s, EventArgs e) 在 System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

百思不得其解。后来在google上搜到一下信息,问题得到解决,希望对碰到同样的问题的朋友有用。

DotNetNuke Error "System.Security.Cryptography.CryptographicException: Bad Data."

If you receive a Bad Data error when working with DotNetNuke, the problem seems to be with cookies. The solution is to clear the cookies from your computer, and that should take care of the problem. It worked for me when I encountered the error. There is a discussion on this at http://forums.asp.net/975037/ShowPost.aspx, and one of the core team members has a code workaround.

After I cleared my cookies, I changed the name of the FormsAuthentication cookie in my web.config, and the problem has not happened again.

http://aspadvice.com/blogs/rjdudley/archive/2005/07/15/2634.aspx Richard Dudley

asp论坛关于次问题的讨论,其中有解决代码,和详细原因分析:

http://forums.asp.net/p/898519/975037.aspx#975037

发生的原因是在登录了一个dnn的应用程序后,没有退出来,然后又登录其他应用程序的时候就会发生这样的错误。

解决方法:清空Cookies

具体原因请参考以上链接!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: