This project has moved. For the latest updates, please go here.

SFTP adapter issue 'The process cannot access the file 'SftpHostFiles.config' because it is being used by another process.'

Aug 5, 2013 at 1:54 PM
Hi,

We are using the BizTalk SFTP adapter of codeplex but are experiencing some issues lately. At different, very randomly, times we see following errors in the eventviewer:

Event Type: Error
Event Source: SFTPAdapter
Event Category: None
Event ID: 1001
Date: 05/08/2013
Time: 10:23:43
User: N/A
Computer: SVCHABIZLIV
Description:
Method: Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.connect

Error: Unable to connect to Sftp host [10.136.241.121]

Information:
Type: System.Exception
Target:
Message: Unable to connect to Sftp host [10.136.241.121]

Stacktrace:

Type: System.IO.IOException
Target: Void WinIOError(Int32, System.String)
Message: The process cannot access the file 'SftpHostFiles.config' because it is being used by another process.
Stacktrace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, IsolatedStorageFile isf)
at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, IsolatedStorageFile isf)
at Blogical.Shared.Adapters.Sftp.ApplicationStorageHelper.Save(ArrayList applicationStorage)
at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.CheckHostKey()
at Blogical.Shared.Adapters.Sftp.SharpSsh.Sftp.connect(Boolean force)


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Sometimes these errors don't occur for a couple of hours but then again, serveral of these errors occur multiple times within 15 minutes for example.

As the error states: 'The process cannot access the file 'SftpHostFiles.config' because it is being used by another process.', we already had a look at this config file. It was about +10.000 rows large before, but we emptied it (while the sftp receive locations were disabled). We thought the fact it was so big could cause some issues, but this has not solved our issue.

Has anyone experienced the same behavior yet? Were you able to resolve it?

Thank you very much in advance for your feedback.