Exception from lib in

Post Reply
Noel
Posts: 3
Joined: Wed Oct 30, 2019 6:47 pm

Exception from lib in

Post by Noel » Wed Oct 30, 2019 6:57 pm

I am trying to use your SmppClientDemo and i get an exception when sending a SMPP request.
The app. connects but it doesn't send anything when pressing the Submit button and we get that Exception:

14:44:02.989: Error (SmppClient1) Failed to send SMPP Request., Exception: System.ArgumentOutOfRangeException: Too long
Parameter name: S
at †††
††††—œ.†††
††††—›.†††
††††˜Ž(String , Int32 )
at Inetlab.SMPP.Common.SmppWriter.†††
†††Š•(Object , Object , Int32 )
at Inetlab.SMPP.Common.SmppWriter.Write(SubmitSm pdu)

(The stack trace has unprintable chars).

The Source is 5 chrs long Dest 10 chrs TON / NPI 1 Default Data Coding / ShortMessage

Been looking and trying for hours without success.

Our company will buy a licence if we can make it to work properly.

Thank for your Help

Noël
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Exception from lib in

Post by alt » Wed Oct 30, 2019 9:12 pm

Same issue is discussed in the post Error after clock was moved 1 hour back
Noel
Posts: 3
Joined: Wed Oct 30, 2019 6:47 pm

Re: Exception from lib in

Post by Noel » Thu Oct 31, 2019 2:47 pm

Hello alt.

I can confirm that the .ExpireIn is the source of the bug:


ISubmitSmBuilder builder = SMS.ForSubmit()
.From(sourceAddress)
.To(destinationAddress)
.Coding(coding)
.Text(_messageText)
//.ExpireIn(TimeSpan.FromDays(7)) // <= BUG
//.ExpireIn(TimeSpan.FromMinutes(1440)) // <= BUG
.ExpireIn(TimeSpan.FromMinutes(1439)) // OK !!!
.DeliveryReceipt();

Any interval that is equal or greater to 1 day causes the exception.

Thank you for your help !

Noël
Noel
Posts: 3
Joined: Wed Oct 30, 2019 6:47 pm

Re: Exception from lib in

Post by Noel » Thu Oct 31, 2019 9:57 pm

Hello again alt

Happy to report that once the source of the little bug have been identified,
i was able to write a fully functional, fully async, SMPP client in a few hours,
whit some 300 lines of code.

You have got a new client ;-)
Post Reply