Monday, May 21, 2007

Windows SFU and the BizTalk FILE adapter

In the previous post I mentioned a problem we had picking up files from a UNIX box using the FTP adapter. In the lack of a good solution to the FTP problem, we decided to try the Windows Services for UNIX (SFU) and then to use a simple file adapter to pick up the files.

The Windows SFU will let you connect to UNIX folders as if the where Windows folders. You basically just apply the UNIX credentials the "Client for NFS" part of SFU enables Windows computers to access UNIX files and directories without making any changes on the UNIX box. You can the browse the folders by mapping the them as network drives or by using the UNC path. (You can read more on http://technet.microsoft.com/en-us/interopmigration/bb380242.aspx)

Having set up SFU using the supplied administrative console, I could browse the files on the UNIX box through Windows Explorer as if they were any other network share.

Two receive locations were configured to poll the new network shares using the FILE adapter, and I started the application. But it didn't work as planned. I tried various approaches, but none of them worked:
  1. Setting the file pick-up folder to point to a mapped network drive (i.e. y:\MyFolder\*.xml).
    Problem: I would get a "path not found" error in the eventlog even though I could copy the path to an Explorer and browse the files fine.

  2. Setting the file pick-up folder to point to the UNC path of the UNIX share (i.e. \\MyServer\MyFolder\*.xml).
    Problem: I would get a "Logon failure: unknown user name or bad password".

  3. Setting the file pick-up folder to point to the UNC path of the UNIX share (i.e. \\MyServer\MyFolder\*.xml) AND applying the UNIX credentials as alternative authentication on the FILE adapter properties.
    Problem: Nothing happened! Absolutely nothing! The files were not picked up and there was no errors to be found in the eventlog.

There really wasn't much help to be found anywhere on the net, but it seemed obvious for the problems to be related to some security issue. The solution turned out be to map the Windows user running the BizTalk Host Instance to the UNIX user applied in SFU and then to go with the 2. setup described above: Setting the file pick-up folder to point to the UNC path of the UNIX share.

No comments: