M
Matt Sollars
I've struggled with this problem, and it's lack of examples, for a couple of
months now. On several different web applications that we have written, we
need to communicate with a credit card merchant servicer. On one of the
projects a secure connection was made with a WebRequest object and during
the reply, a trust error was received. I can't remember the full details due
to the time it's been since that project.
The most recent project required a secure connection via a web service that
the merchant service provides. I instantiate an instance of the service and
call the method that processes the credit card. No matter what I try to get
around it, I get the same error message:
System.EntryPointNotFoundException: Unable to find an entry point named
EnumerateSecurityPackagesW in DLL security.dll.
The stack trace results in the following:
[EntryPointNotFoundException: Unable to find an entry point named
EnumerateSecurityPackagesW in DLL security.dll.]
System.Net.NativeNTSSPI.EnumerateSecurityPackagesW(Int32& pkgnum, IntPtr&
arrayptr) +0
System.Net.SSPISecureChannelType.EnumerateSecurityPackages(Int32& pkgnum,
IntPtr& arrayptr) +45
System.Net.SSPIWrapper.EnumerateSecurityPackages(SSPIInterface SecModule)
+57
System.Net.SSPIWrapper.GetSupportedSecurityPackages(SSPIInterface
SecModule) +29
System.Net.SecureChannel..cctor() +41
[TypeInitializationException: The type initializer for
"System.Net.SecureChannel" threw an exception.]
System.Net.SecureChannel..ctor(String hostname, X509CertificateCollection
clientCertificates) +0
System.Net.TlsStream.Handshake(ProtocolToken message) +51
[WebException: The underlying connection was closed: Could not establish
secure channel for SSL/TLS.]
System.Net.HttpWebRequest.CheckFinalStatus() +674
System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult)
+74
System.Net.HttpWebRequest.GetRequestStream() +132
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) +105
MyApplication.net.eftsecure.va.TRANSACTION_PROCESSING.BANKCARD_AUTHONLY(Stri
ng M_ID, String M_KEY, String C_NAME, String C_ADDRESS, String C_CITY,
String C_STATE, String C_ZIP, String C_COUNTRY, String C_EMAIL, String
C_CARDNUMBER, String C_EXP, String C_CVV, String T_CUSTOMER_NUMBER, String
T_AMT, String T_SHIPPING, String T_TAX, String T_ORDERNUM, String
C_TELEPHONE, String C_FAX, String C_SHIP_NAME, String C_SHIP_ADDRESS, String
C_SHIP_CITY, String C_SHIP_STATE, String C_SHIP_ZIP, String C_SHIP_COUNTRY)
in c:\inetpub\wwwroot\MyApplication\Web
References\net.eftsecure.va\Reference.vb:140
MyApplication.ConfirmOrder.btnConfirm_Click(Object sender, EventArgs e)
in c:\inetpub\wwwroot\MyApplication\ConfirmOrder.aspx.vb:93
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo
stBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1247
I've tried a few things. I created a new class implementing
ICertificatePolicy that just returns True in the CheckValidationResult
method and set the ServicePointManager.CertificatePolicy to a new instance
of that class. I've output the SSL certificate on the server to a CER file
and added it to the web service's client certificates via
ClientCertificates.Add(X509Certificate.CreateFromCertFile(Server.MapPath("My
ApplicationCert.cer"))). Each of these things were tried separately and
together just before the web service's method is invoked and nothing has
remedied the problem.
Please, help. Any suggestions, questions, ideas or examples will be greatly
appreciated.
Thanks in advance,
--
Matt Sollars
(e-mail address removed)
-------------------
The Hypersite Network
2002 N. Salisbury Blvd.
Suite C
Salisbury, Maryland 21801
T: 410.749.2000
F: 410.219.3400
http://www.hypersite.net
months now. On several different web applications that we have written, we
need to communicate with a credit card merchant servicer. On one of the
projects a secure connection was made with a WebRequest object and during
the reply, a trust error was received. I can't remember the full details due
to the time it's been since that project.
The most recent project required a secure connection via a web service that
the merchant service provides. I instantiate an instance of the service and
call the method that processes the credit card. No matter what I try to get
around it, I get the same error message:
System.EntryPointNotFoundException: Unable to find an entry point named
EnumerateSecurityPackagesW in DLL security.dll.
The stack trace results in the following:
[EntryPointNotFoundException: Unable to find an entry point named
EnumerateSecurityPackagesW in DLL security.dll.]
System.Net.NativeNTSSPI.EnumerateSecurityPackagesW(Int32& pkgnum, IntPtr&
arrayptr) +0
System.Net.SSPISecureChannelType.EnumerateSecurityPackages(Int32& pkgnum,
IntPtr& arrayptr) +45
System.Net.SSPIWrapper.EnumerateSecurityPackages(SSPIInterface SecModule)
+57
System.Net.SSPIWrapper.GetSupportedSecurityPackages(SSPIInterface
SecModule) +29
System.Net.SecureChannel..cctor() +41
[TypeInitializationException: The type initializer for
"System.Net.SecureChannel" threw an exception.]
System.Net.SecureChannel..ctor(String hostname, X509CertificateCollection
clientCertificates) +0
System.Net.TlsStream.Handshake(ProtocolToken message) +51
[WebException: The underlying connection was closed: Could not establish
secure channel for SSL/TLS.]
System.Net.HttpWebRequest.CheckFinalStatus() +674
System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult)
+74
System.Net.HttpWebRequest.GetRequestStream() +132
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) +105
MyApplication.net.eftsecure.va.TRANSACTION_PROCESSING.BANKCARD_AUTHONLY(Stri
ng M_ID, String M_KEY, String C_NAME, String C_ADDRESS, String C_CITY,
String C_STATE, String C_ZIP, String C_COUNTRY, String C_EMAIL, String
C_CARDNUMBER, String C_EXP, String C_CVV, String T_CUSTOMER_NUMBER, String
T_AMT, String T_SHIPPING, String T_TAX, String T_ORDERNUM, String
C_TELEPHONE, String C_FAX, String C_SHIP_NAME, String C_SHIP_ADDRESS, String
C_SHIP_CITY, String C_SHIP_STATE, String C_SHIP_ZIP, String C_SHIP_COUNTRY)
in c:\inetpub\wwwroot\MyApplication\Web
References\net.eftsecure.va\Reference.vb:140
MyApplication.ConfirmOrder.btnConfirm_Click(Object sender, EventArgs e)
in c:\inetpub\wwwroot\MyApplication\ConfirmOrder.aspx.vb:93
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo
stBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1247
I've tried a few things. I created a new class implementing
ICertificatePolicy that just returns True in the CheckValidationResult
method and set the ServicePointManager.CertificatePolicy to a new instance
of that class. I've output the SSL certificate on the server to a CER file
and added it to the web service's client certificates via
ClientCertificates.Add(X509Certificate.CreateFromCertFile(Server.MapPath("My
ApplicationCert.cer"))). Each of these things were tried separately and
together just before the web service's method is invoked and nothing has
remedied the problem.
Please, help. Any suggestions, questions, ideas or examples will be greatly
appreciated.
Thanks in advance,
--
Matt Sollars
(e-mail address removed)
-------------------
The Hypersite Network
2002 N. Salisbury Blvd.
Suite C
Salisbury, Maryland 21801
T: 410.749.2000
F: 410.219.3400
http://www.hypersite.net