'/' 應用程式中發生伺服器錯誤。

已關閉安全控制代碼

描述: 在執行目前 Web 要求的過程中發生未處理的例外狀況。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。

例外狀況詳細資訊: System.ObjectDisposedException: 已關閉安全控制代碼

原始程式錯誤:


行 34: 
行 35:     private static string makeMD5(string key) {
行 36:         byte[] b = md5.ComputeHash(Encoding.UTF8.GetBytes(key));
行 37:         return BitConverter.ToString(b).Replace("-", string.Empty);
行 38:     }

原始程式檔: d:\Web\MoneyLink\APP_Code\LoginUtil.cs    行: 36

堆疊追蹤:


[ObjectDisposedException: 已關閉安全控制代碼]
   System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success) +0
   System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success) +32
   System.Security.Cryptography.Utils.HashData(SafeHashHandle hHash, Byte[] data, Int32 cbData, Int32 ibStart, Int32 cbSize) +0
   System.Security.Cryptography.MD5CryptoServiceProvider.HashCore(Byte[] rgb, Int32 ibStart, Int32 cbSize) +58
   System.Security.Cryptography.HashAlgorithm.ComputeHash(Byte[] buffer) +48
   LoginUtil.makeMD5(String key) in d:\Web\MoneyLink\APP_Code\LoginUtil.cs:36
   LoginUtil.getLoginMD5() in d:\Web\MoneyLink\APP_Code\LoginUtil.cs:30
   LoginUtil.redirectToAccountPlatform(HttpRequest req) in d:\Web\MoneyLink\APP_Code\LoginUtil.cs:131
   AbstractTemplate.checkLogin() in d:\Web\MoneyLink\APP_Code\AbstractTemplate.cs:82
   RealTimeNews_NewsContent.Page_Load(Object sender, EventArgs e) in d:\Web\MoneyLink\RealtimeNews\NewsContent.aspx.cs:33
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


版本資訊: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.7.4087.0