System.Net.WebException SSL HTTPS
Catched Exception: [System.Net.WebException]: "基础连接已经关闭: 接收时发生错误。" in
System.Net.WebException: 基础连接已经关闭: 接收时发生错误。 ---> System.EntryPointNotFoundException: 无法在 DLL“security.dll”中找到名为“EnumerateSecurityPackagesW”的入口点。
在 System.Net.UnsafeNclNativeMethods.SafeNetHandles_SECURITY.EnumerateSecurityPackagesW(Int32& pkgnum, SafeFreeContextBuffer_SECURITY& handle)
在 System.Net.SafeFreeContextBuffer.EnumeratePackages(SecurDll Dll, Int32& pkgnum, SafeFreeContextBuffer& pkgArray)
在 System.Net.SSPISecureChannelType.EnumerateSecurityPackages(Int32& pkgnum, SafeFreeContextBuffer& pkgArray)
在 System.Net.SSPIWrapper.EnumerateSecurityPackages(SSPIInterface SecModule)
在 System.Net.SSPIWrapper.GetVerifyPackageInfo(SSPIInterface secModule, String packageName, Boolean throwIfMissing)
在 System.Net.Security.SecureChannel..ctor(String hostname, Boolean serverMode, SchProtocols protocolFlags, X509Certificate serverCertificate, X509CertificateCollection clientCertificates, Boolean remoteCertRequired, Boolean checkCertName, Boolean checkCertRevocationStatus, LocalCertSelectionCallback certSelectionDelegate)
在 System.Net.Security.SslState.ValidateCreateContext(Boolean isServer, String targetHost, SslProtocols enabledSslProtocols, X509Certificate serverCertificate, X509CertificateCollection clientCertificates, Boolean remoteCertRequired, Boolean checkCertRevocationStatus, Boolean checkCertName)
在 System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
在 System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
在 System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
在 System.Net.ConnectStream.WriteHeaders(Boolean async)
--- 内部异常堆栈跟踪的结尾 ---
我再處理 WCF 的服務時
只要是用Http改到Https都會出現此問題
結論後確認是目錄下不可以有Security同名的DLL
若你跟我一樣用自家的Security.dll
那就醫定要改名才不會衝突到
System.Net.WebException: 基础连接已经关闭: 接收时发生错误。 ---> System.EntryPointNotFoundException: 无法在 DLL“security.dll”中找到名为“EnumerateSecurityPackagesW”的入口点。
在 System.Net.UnsafeNclNativeMethods.SafeNetHandles_SECURITY.EnumerateSecurityPackagesW(Int32& pkgnum, SafeFreeContextBuffer_SECURITY& handle)
在 System.Net.SafeFreeContextBuffer.EnumeratePackages(SecurDll Dll, Int32& pkgnum, SafeFreeContextBuffer& pkgArray)
在 System.Net.SSPISecureChannelType.EnumerateSecurityPackages(Int32& pkgnum, SafeFreeContextBuffer& pkgArray)
在 System.Net.SSPIWrapper.EnumerateSecurityPackages(SSPIInterface SecModule)
在 System.Net.SSPIWrapper.GetVerifyPackageInfo(SSPIInterface secModule, String packageName, Boolean throwIfMissing)
在 System.Net.Security.SecureChannel..ctor(String hostname, Boolean serverMode, SchProtocols protocolFlags, X509Certificate serverCertificate, X509CertificateCollection clientCertificates, Boolean remoteCertRequired, Boolean checkCertName, Boolean checkCertRevocationStatus, LocalCertSelectionCallback certSelectionDelegate)
在 System.Net.Security.SslState.ValidateCreateContext(Boolean isServer, String targetHost, SslProtocols enabledSslProtocols, X509Certificate serverCertificate, X509CertificateCollection clientCertificates, Boolean remoteCertRequired, Boolean checkCertRevocationStatus, Boolean checkCertName)
在 System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
在 System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
在 System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
在 System.Net.ConnectStream.WriteHeaders(Boolean async)
--- 内部异常堆栈跟踪的结尾 ---
我再處理 WCF 的服務時
只要是用Http改到Https都會出現此問題
結論後確認是目錄下不可以有Security同名的DLL
若你跟我一樣用自家的Security.dll
那就醫定要改名才不會衝突到
留言