wcf https issue
I am trying to call a web service over HTTPS using a Solicit-Response send port with the WCF adapter on BizTalk 2006 R2 on Windows Visa but am getting the following error:
Error details: System.ServiceModel.CommunicationException: An error occurred while making the HTTP request to https://xxxxxxxxxxxx. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
I started with the wcf-basichttp and have also tried the wcf-custom transport types and various transport level security options with the same results.  After some digging around and trying the same call through code, I replicated a similar error in code for the web service call and resolved it by adding the following:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
From what I have understood from researching this issue, this has to do with Windows Vista/2008 automatically using TLS 1.0 during the SSL communication and if the end web service doesn't support it, windows will use SSL3.  In some cases if the endpoint ends the connection and doesn't support this type of handshake, the above error is raised.  Is there a way to setup the WCF send port with some custom binding to accommodate what the above line of code does?  Any help would be appreciated
  • Moved by Ben Cline1Moderator Sunday, October 11, 2009 2:37 AM Related to adapters (From:BizTalk Server General)
October 9th, 2009 6:48pm

Yes, you can setup a custom WCF binding via the machine.config in BizTalk 2006 R2 and in other config locations if you install BizTalk 2006 R2 SP1. The beta for this SP1 came out yesterday: http://blogs.msdn.com/biztalkcrt/archive/2009/10/09/announcing-biztalk-2006-r2-sp1.aspx 

Thanks,
Free Windows Admin Tool Kit Click here and download it now
October 11th, 2009 2:35am

Thanks for the reply.  Unfortunately I could not find the wcf binding property (that can be set in config) that is associated with ServicePointManager.SecurityProtocol.  Maybe I am not understanding it correctly, I am not familiar with the WCF custom bindings.  Would I have to write an extension in code and then add it in the config?  Thanks a lot for the help.
October 11th, 2009 6:53pm

You might be able to add your line:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;

to a custom behavior (something like IEndPointBehavior and in the ApplyClientBehavior method). I'm just not sure if ServicePointManager will be available there. If it is then register the behavior in machine.config and use it from your WCF send port.
Free Windows Admin Tool Kit Click here and download it now
October 11th, 2009 7:28pm

Here is a good tutorial on a custom endpoint/service behavior with BizTalk: http://www.richardhallgren.com/category/wcf/.

If you go the 2006 R2 SP1 route then instead of using machine.config to register the custom behavior with BizTalk you just create a config file with the <add> line for the custom WCF extension in a config file and import it on the send/receive handler for WCF-Custom or receive handler for WCF-CustomIsolated and then it will show up in the behaviors tab of a WCF port.

Thanks,
October 11th, 2009 9:11pm

I found the solution. I publish the solution here: http://miguelaup.zzl.org/como-enviar-usando-ssl3-con-biztalk-2009
  • Proposed as answer by miguelaup Monday, June 14, 2010 11:02 PM
Free Windows Admin Tool Kit Click here and download it now
June 14th, 2010 11:02pm

Thanks for the update Miguel. Basically editing the Reference.cs class with the "ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;" line, good stuff.

It seems like that is a Web Reference (old SOAP adapter) isntead of a service reference (WCF). Have you tried editing the Reference.cs file under the .svcmap file for WCF service reference to see if it works as well?

Regards,

June 15th, 2010 1:13am

Hi,

Related to the above post i m facing the same issue with BizTalk 2010 on calling a external web service with SSL certificate. getting the below error, the solution you have published in the site is unavailable now, could you please send me the resolution for the error

System.ServiceModel.CommunicationException: An error occurred while making the HTTP request to https://xxxxx

This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server.

Thanks,

Sowmya.J

Free Windows Admin Tool Kit Click here and download it now
October 31st, 2014 6:39am

Hi Thiago,

I am facing the same issue and following this thread very carefully.

My Problem is I am using Dynamic Send Port and not sure how can I achieve custom behavior extension on Dynamic Send Ports?

Please help in case you know.

Thanks,

Vikash

May 3rd, 2015 10:23am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics