While on a current project, I needed to go off to a WebServer and grab a page, parse it to make sure all was alive and kicking (a system verification page).
Connected and ended up getting –
The adapter failed to transmit message going to send port “http://<server>/<site>/”.
It will be retransmitted after the retry interval specified for this Send Port. Details:”The
remote server returned an error: (505) Http Version Not Supported.”.
The weird thing is, that when BTS retries (in 5 mins) – it works!!! No good for production!
After doing some digging, the problem lies around the fact that .NET 1.1 (in my case)
clients use HTTP 1.1 by default.
There is a HTTP Header “Expect: 100-Continue” that is inserted into the outgoing
webrequests.
The JBOSS WebServer grumbles about this – more
info.
Now from BTS we can get access to the HTTP/SOAP Headers Collection – msg(HTTP.InputHeaders)=….
Solution:
Add this setting to the BizTalk Config file (BTSNTSvc.exe.config)
<system.net>
<settings>
<servicePointManager checkCertificateName=”true”
checkCertificateRevocationList=”false” expect100Continue=”false” />
</settings>
</system.net>
NOTE: this will set all outgoing HTTP requests (including SOAP), to pick and choose
which addresses this applies to….. is to most probably write
a webRequestModules for the Addresses. This is a bit of code but allows you
to either turn this setting on/off or pass the original request through
to the default HTTPWebRequestModule (check out machine.config) for more.
This is by far the most elegant – there are other ways to do this, they all seem offensive!
Cheers,
Mick.