FTP and BizTalk Services

Continuing with my exploration of BizTalk services I thought I’d start with a simple end-to-end scenario, although it is something that roughly maps to a real customer requirement we have right now –

I wanted a bridge to pick up a file from an FTP location and drop it onto a Service Bus Queue (from which BizTalk 2013 would pick it up, but that’s another story…)

 

I create a simple pass-through bridge configuration to begin with, with my topic details on the one side and the ftp details on the other –

image

For the FTP server I deployed a small IaaS instance on Azure and configured an FTP server on it, I then entered all the details for the topic and configured the FTP endpoint.

That done I deployed the solution only to see an error stating –

Failed to connect to the FTP server using specified configuration. Error message – ‘The remote certificate is invalid according to the validation procedure.’

It was nice to see such a detailed error an indeed I quickly realised that the Use SSL property on the FTP source is on by default, but I had not configured SSL for my FTP site so I promptly changed that to False and re-deployed.

Unfortunately, this one didn’t work either, and now the error wasn’t that useful – “The underlying connection was closed: An unexpected error occurred on a receive.” – but it was useful to be able to get more details on the BizTalk Services (silverlight based) portal, accessible through the Windows Azure Portal –

image

In the BizTalk Services Portal there’s a tracking tab, and in that I found the details of this particular issue –

image

Failed to connect to the FTP server using specified configuration. Error message – ‘The remote server returned an error: 227 Entering Passive Mode (100,84,86,13,192,39)..’

As far as I understand this is an issue with my FTP setup more than anything else – it is  fair to expect to need to use passive mode for FTP (BizTalk services will block incoming FTP connections required for active mode) and my Azure based FTP server configuration will struggle accepting incoming connection on semi-random ports, which I believe is what’s happening here (and if you want to read more, I found this very useful)

I’ve decided to ignore this self-introduced issue and use another public FTP server I have access to, but it was good to see the level of detailed errors one can get from the BizTalk portal with ease.

With this ‘proper’ FTP server and after a bit more fiddling with settings and re-deploying, it worked and I could see my ‘messages’ being picked up from my FTP location and placed on the Service Bus Queue

 

Cross posted on the Solidsoft blog

About Yossi Dahan
I work as a cloud solutions architect in the Azure team at Microsoft UK. I spend my days working with customers helping be successful in the cloud with Microsoft Azure.

Leave a comment