Friday, August 26, 2011

BizTalk: /n Software Read Only (S)FTP Locations

Another /n Software feature that I recently learned about involves Read Only FTP locations.  The idea behind this feature is the the source system does not want you to remove the file once it has been downloaded.  This could be for a variety of reasons including the file may be available to multiple consumers or the source system would like to archive the file once it has been consumed.

Read only FTP locations is a new supported scenario with BizTalk 2010.  /n Software has supported this scenario for at least a few years.  You can enable this feature by simply specifying the Delete Mode as Never on a Receive Location that is using the /n Software adapter.

image

So this is all very intriguing,  I am sure,  but it is pretty obvious so why does this deserve a blog post?  The reason for the blog post is to discuss a lesser known property called DownloadCacheFile. After scanning your receive location you will discover that this property is not visible.  This property is exposed through the Other property.  Within this property we can specify DownloadCacheFile=c:\myCacheFile.txt

image

As files are processed they will be added to this file and a record is kept so that they are not downloaded in subsequent polls of the (S)FTP location.

image

In the BizTalk 2010 implementation, Microsoft is using a database to store this type of information where as /n Software has chosen the file route.  Time will tell how well this feature works.  I would imagine that there is an upper limit where the file becomes so large that it slows performance or potentially corrupts.

Also note that if you are using a Clustered host instance to host your FTP Receive locations, this file should be in a shared storage location so that the Clustered host instance has access to it no matter which Server it is actively running on.

2 comments:

Unknown said...

I am using nsoftware FTP community one and trying to acess of the of vendors ftp site which has only read privilges to a user. So when I done setting up the requirments for FTP and start the receive location and I have delete after download as "Never" and then I get an error "Error downloading FTP messages: FTP protocol error: 500 User Exit denies Userid 'USER' from using Command 'CWD'."
As this vendor won't give us write permission

Kent Weare said...

I haven't seen this one before. You may want to contact NSoftware to get a better sense of what the adapter is doing under the hood.