zoukankan      html  css  js  c++  java
  • Creating CustomBinding for WCFBasicHTTP for SSL and BasicAuthentication in BizTalk 转载自:http://geekswithblogs.net/mipsen

    Two posts on one day? Is he on his holidays? Yes!

    We had a lot of trouble with this error:

    ...Error Description: System.ServiceModel.CommunicationException: An error (The request was aborted: The request was canceled.) occurred while transmitting data over the HTTP channel....

    You find a few posts about it in the www but the answers are somewhat conflicting and not very nice. No, I will not tell you the answer in this post, because we still do not really have it, but I want to show you how to perform one step that might lead you closer to it.

    The error occurs under high load only in one of our environments. Of course the production environment.. Thank you, Mr. Murphy...

    We are using a rather complicated Orchestration structure and make a lot of WCF-calls from BizTalk to WCF-Services. As a binding we use WCFBasicHttpBinding with SSL and Basic Authentication. Most of the posts in the www point to setting the KeepAlive-flag to false. MS-Suport asked us to it, too. But this is not a property present in the usual WCFBasicHttpBinding. So we had to switch to customBinding in WCF-Custom Transport. I was not able to find posts about how to do that and had to try out a few things until I was successful. To save you some time, here is what worked:

    1. Import the custom-binding that was created when generating the service-reference (switching completely from DynamicPort to a static Port, but that is another story...)
    2. Configuring the Transport I switched the BindingType in Binding to "customBinding"
    3. Remove the "httpTransport" extension and add a "httpsTransport" extension, as you want to use SSL. You have to remove "httpTransport" first because otherwise "httpsTransport" will not show up in the extensions.
    4. Move "httpsTransport" to the last place of the extensions, otherwise BizTalk/WCF does not like it...
    5. In "httpsTransport" set "authenticationScheme" to "Basic"
    6. Here you can set "keepAliveEnabled" to "false" and other important properties like "maxReceivedMessageSize", too!
    7. In the "textMessageEncoding" node you have to set "messageVersion" from "Default" to "Soap11WSAddressingAugust2004" as you want to use basicHttp under the hood. Under "textMessageEncoding" you will find the "ReaderQuotas", too.
    8. In the "Credentials"-tab set username and password for basic authentication, or use SSO

    When trying for the first time with the newly created SendPort I got an error that communication with the service could not be established. The binding was changed to custom-binding so that was not too surprising...

    To make things a little easier I exported a web.config in the "Import/Export"-tab in the WCF-Custom Transport Properties and adjusted the web.config of the service I called based on the exported web.config. Here we were fortunate enough that the Service is under our control and it is a WCF-service...

    Now it works all fine. If it really helps us with error we will find out soon. To be continued...

    *****

    Update: All the work did not help with the error at all. It turned out it was the service on the other side producing the error. But I don't know what has been changed to get it working.

    posted on Friday, June 25, 2010 10:45 AM
    Filed Under [ BizTalk WCF ]
  • 相关阅读:
    iOS 关于第三方键盘
    linux分期挂载永久生效
    linux echo 用法 【 -e c 体会】
    expr index
    tail -f 不好用? 用法小解析
    【Linux】su
    Linux 下mv命令使用 目标目录不存在时会更名被目标目录并放在/目录下
    Java一点笔试题【2016-04-13】
    Linux 上重启tomcat 【转】 http://www.cnblogs.com/tovep/articles/2473147.html
    Oracle Merge into [转] [ http://www.cnblogs.com/dongsheng/p/4384754.html]
  • 原文地址:https://www.cnblogs.com/xcwytu/p/2744215.html
Copyright © 2011-2022 走看看