IndexOutOfRangeException

Smpp v3.4 client

Moderator: alt

Locked
Darko
Posts: 2
Joined: Wed Sep 17, 2008 7:56 pm

IndexOutOfRangeException

Post by Darko » Wed Sep 17, 2008 8:28 pm

Hi,

when I try to send a message by clicking the Submit button, I get the following error:

Code: Select all

Index was outside the bounds of the array.
Source: "ALT.SMS.SmppClient"
Stack Trace:    at wHcW8EeS8UMgjM9EFR.aEOKR878JGLThiP76W.h3tU8bWl5(Int32& )
   at ALT.SMS.Header..ctor(aEOKR878JGLThiP76W buf, Int32& offset)
   at ALT.SMS.SmppClient.l9Tj3F1GX(MemoryStream& )
   at ALT.SMS.SmppClient.QXhVET1OP(IAsyncResult )
   at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   at System.Net.ContextAwareResult.CompleteCallback(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.Net.ContextAwareResult.Complete(IntPtr userToken)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
   at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
The program appears to be connected:

Code: Select all

22:26:42: SmppClient connected
22:26:42: Binding SmppClient for SystemId: SMPP176
22:26:42: Sending Data: 000000250000000900000000154e87cc534d505031373600736d7363313736000034000000
22:26:42: SmppClient bound
22:26:42: Bind result : sytem is smsc with status ESME_ROK
22:26:42: Received Data: 0000001a8000000900000000154e87cc736d7363000210000134

This is the last line in the log:

Code: Select all

Sending Data: 000000350000000400000000781e75cc00050136343030000101333831363430343734373930000000000000000000000454657374
Any ideas?

Thanks,
Darko
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Post by alt » Thu Sep 18, 2008 6:59 am

It seems that it is problem of length when SMSC sends wrong packet length.
Can you give me an access to your SMSC?
Darko
Posts: 2
Joined: Wed Sep 17, 2008 7:56 pm

Post by Darko » Mon Sep 22, 2008 4:16 pm

I've sent you a PM with the details.

Cheers,
Darko
Locked