Bad LocalPath on IDocumentStorageItem
Posted: Tue Jun 16, 2009 1:33 pm
Hello,
I ran into a serious issue in our production environment when using the IDocumentStorageItem passed into my implementation of IDocumentStorage.SaveDocument().
The IDocumentStorageItem passed to my method seems to have a production stopping issue in the OriginalLocation System.Uri member of the object.
The path the user select to add the document was 'G:\CO_Prestige\FANNIE MAE AND LITTON FILES\3245 Milwaukee St #10\FNMA Wavier.doc'
When I was developing I assumed that what was passed to me would be complete URI so I used the LocalPath of the OriginalLocation to store the document. But when we went into producion yesterday our users were experiencing errors during the save document portion. I trapped enough information in my log file to find the LocalPath has a value of 'G:\CO_Prestige\FANNIE MAE AND LITTON FILES\3245 Milwaukee St' which is incomplete so my SaveDocument method fails because '3245 Milwakee St is not a file'. When I wrote a test app that creates a System.Uri off the same path the LocalPath is complete.
Not sure what's going on and I had to pretty much hack in using OriginalString for Path.GetFullPath() method to read past 'file:////' if it was there.
I have a screen shot of QuickWatch of IDocumentStorageItem passed to my method if that's of any interest - apparently its too big to upload.
I ran into a serious issue in our production environment when using the IDocumentStorageItem passed into my implementation of IDocumentStorage.SaveDocument().
The IDocumentStorageItem passed to my method seems to have a production stopping issue in the OriginalLocation System.Uri member of the object.
The path the user select to add the document was 'G:\CO_Prestige\FANNIE MAE AND LITTON FILES\3245 Milwaukee St #10\FNMA Wavier.doc'
When I was developing I assumed that what was passed to me would be complete URI so I used the LocalPath of the OriginalLocation to store the document. But when we went into producion yesterday our users were experiencing errors during the save document portion. I trapped enough information in my log file to find the LocalPath has a value of 'G:\CO_Prestige\FANNIE MAE AND LITTON FILES\3245 Milwaukee St' which is incomplete so my SaveDocument method fails because '3245 Milwakee St is not a file'. When I wrote a test app that creates a System.Uri off the same path the LocalPath is complete.
Not sure what's going on and I had to pretty much hack in using OriginalString for Path.GetFullPath() method to read past 'file:////' if it was there.
I have a screen shot of QuickWatch of IDocumentStorageItem passed to my method if that's of any interest - apparently its too big to upload.