The best way to debug this is put your logging in Verbose mode for the .NET SDK and then review any additional messages that print out around that error. I typically like to look at all the logging for the entire file transfer to see if there are any timeouts or any additional messages that could provide further insight into why there was a failure.
A few questions I have for you:
- How large is the file?
- Does the file transfer run for a bit and then fail, or does it fail a few milliseconds/seconds after starting?
- Do other file sizes transfer to completion?
Hi Meghan Hollenbach,
I have added to logs to my dot net SDK. I could get the reason for this partially.
Please find the error logs below:
FT_Test_1469179182472.txt | targetChecksum: c92e63a7bd53737f78a9b49e6df1b6b0 | startTime: 1469179182473 | endTime: 1469179184526 | duration: 2053 | state: ERROR | isComplete: False | size: 111 | user: CNHInfosys | message: Error occured during transfer.
2016-07-22 14:53:17.852Z [L: Error] [T: 14] [U: Radhakrishnan_K02] [O: com.thingworx.communications.client.TwApiWrapper] [Error] twFileManager_GetRealPath: Error getting vdirPath,
2016-07-22 14:53:17.854Z [L: Warning] [T: 14] [U: Radhakrishnan_K02] [O: com.thingworx.communications.client.TwApiWrapper] [Warning] twFileManager_ListVirtualDirs: Error getting file info for \../Test_FT
From this i could figure out that, the file transfer fails because the virtual directory is not loaded properly.
I am not sure why it is not able to get this virtual directory path though i have defined it well using below C# code,
Dictionary<string, string> virtualDirectories1 = new Dictionary<string, string>();
Prescription DeviceObject = new Prescription(ThingName, "Thing corresponding to Vehicle", mClient, virtualDirectories1);
Test_FT directory is not getting listed on Remote thing's service BrowseDirectory on Thingworx composer. I don't get more details for this from error logs.
It helps. I was adding two directories(Test_FT,Incoming) as mentioned in my query. by changing to absolute path for Test_FT, it works.
But for Incoming directory, i have not added any absolute path. Still that Incoming directory works(means listed under the result of service BrowseDirectory in remote thing at server side)