Unsolved
This post is more than 5 years old
1 Message
0
2526
July 2nd, 2009 15:00
Error Retrieving File
We are uploading files as follows (VB.NET):
Dim uploader As New UploadHelper(api)
Dim id As ObjectId
id = uploader.CreateObject(fStream, New Acl(), New MetadataList(), False)
When that runs, the var id contains an object ID.
But when I try to retrieve the file, I get an error.
My code:
Dim buff() As Byte
Dim downLoad As New DownloadHelper(Me.api, buff)
Dim AtmosObject As New ObjectId(Me.txtObjectKey.Text)
downLoad.ReadObject(AtmosObject, Me.SaveFileDialog1.FileName)
The error is System.IndexOutOfRangeException
{"Index was outside the bounds of the array."}
It is thrown by ReadObject.
Stack trace:
at EsuApiLib.Rest.EsuRestApi.readMetadata(MetadataList meta, String header, Boolean listable)
at EsuApiLib.Rest.EsuRestApi.GetSystemMetadata(Identifier id, MetadataTags tags)
at EsuApiLib.DownloadHelper.ReadObject(ObjectId id, Stream stream, Boolean closeStream)
at EsuApiLib.DownloadHelper.ReadObject(ObjectId id, String file)
at AtmosTest.Form1.LinkLabel3_LinkClicked(Object sender, LinkLabelLinkClickedEventArgs e) in C:\Development\Atmos Tester\Form1.vb:line 53
at System.Windows.Forms.LinkLabel.OnLinkClicked(LinkLabelLinkClickedEventArgs e)
at System.Windows.Forms.LinkLabel.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Label.WndProc(Message& m)
at System.Windows.Forms.LinkLabel.WndProc(Message& msg)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at AtmosTest.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
===
I don't REALLY know if the file was uploaded successfully.


JasonCwik
281 Posts
0
July 8th, 2009 14:00
Please download the updated bindings for .NET (updated today). This includes the fix for metadata without a value.
https://community.emc.com/docs/DOC-3484#cf