System.ArgumentOutOfRangeException : Too long (Parameter 'S')

Post Reply
ritik
Posts: 5
Joined: Thu Nov 17, 2022 6:22 am

System.ArgumentOutOfRangeException : Too long (Parameter 'S')

Post by ritik » Mon Sep 04, 2023 9:12 am

Hello,

Lib Version : 2.9.28

I've found the following error :

System.ArgumentOutOfRangeException

Too long (Parameter 'S')

at SMSC.Smpp.Common.BufferWriter.WriteFString(String s, Int32 length) in SMSC.Smpp\Common\BufferWriter.cs:line 112
at SMSC.Smpp.Common.SmppWriter.Write(SubmitSm pdu, BufferWriter writer) in SMSC.Smpp\Common\SmppWriter.cs:line 417
at SMSC.Smpp.Common.SmppWriter.WritePDU(SmppPDU pdu, BufferWriter writer) in SMSC.Smpp\Common\SmppWriter.cs:line 151
at SMSC.Smpp.SmppSession.SerializePDU(SmppPDU pdu) in SMSC.Smpp\SmppSession.cs:line 599
at SMSC.Smpp.SmppSession.SendRequestInternal(SmppRequest request, CancellationToken cancellationToken) in SMSC.Smpp\SmppSession.cs:line 485
at SMSC.Smpp.SmppSession.SendRequestAsync[TRequest,TResponse](TRequest request) in SMSC.Smpp\SmppSession.cs:line 434
at SMSC.Smpp.SmppClientBase.SendRequestAsync[TRequest,TResponse](TRequest request) in SMSC.Smpp\SmppClientBase.cs:line 537
at SMSC.Smpp.SmppClient.SubmitAsync(IEnumerable`1 pduList) in SMSC.Smpp\SmppClient.cs:line 389
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: System.ArgumentOutOfRangeException : Too long (Parameter 'S')

Post by alt » Fri Sep 15, 2023 12:51 pm

It looks like the property ScheduledDeliveryTime or ValidityPeriod has incorrect value in SubmirSm instance.

Could you help me to reproduce the error?

I think the same exception should be thrown when you set the values for SubmitSm instance and try to serialize it

Code: Select all

ver byteArray = submitSm.Serialze(_client.EncodingMapper);
Post Reply