Login  
Search All Forums
Dart Home | PowerTCP Sockets for .NET | Custom Development Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
AuthorForum: PowerTCP Sockets for .NET (Secure and Standard)
Topic: Transfer failing between client and server randomly
WinstonSmith

From: Calgary, AB Canada
Posts: 17
Member Since: 06/11/06
posted November 23, 2007 1:24 PM

I am using your OTP transfer example (slight modification), has worked fine for last year but started failing randomly today.

I have an open stream for writing to the server, it has alreday been written to and this is on the transfer of the first file.

I get to

 'read from the stream
          count = fileStream.Read(buffer, 0, buffer.Length)

          'write to the dest stream
          retStream.Write(buffer, 0, count)

and it fails with the cryptic Visual Studio message

System.Reflection.TargetInvocationException was unhandled
 Message="Exception has been thrown by the target of an invocation."
 Source="mscorlib"
 StackTrace:
    at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
    at System.Delegate.DynamicInvokeImpl(Object[] args)
    at System.Delegate.DynamicInvoke(Object[] args)
    at t.a(IAsyncResult A_0)
    at System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(IMessage msg)
    at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
    at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(Object o)
    at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
    at System.Threading.ExecutionContext.runTryCode(Object userData)
    at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)



Any ideas or suggestions? Has there been an update to the control i need. Again, this worked great for the last year.

Cheers
cbenard

From: USA
Posts: 21
Member Since: 04/20/07
posted November 23, 2007 1:48 PM

Please post what is in the InnerException.
WinstonSmith

From: Calgary, AB Canada
Posts: 17
Member Since: 06/11/06
posted November 23, 2007 2:11 PM

Thank you for the reply, once i checked in my innerException i found a thread cross-reference error that i did not catch. Fired up a delegate and its working again.

Thanks for the second set of eyes(?)

Cheers
Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX