Exception when submitting MM7 request

MMS library for .NET

Moderator: alt

Post Reply
javabeanz
Posts: 2
Joined: Sat Apr 14, 2018 4:43 am

Exception when submitting MM7 request

Post by javabeanz » Sat Apr 14, 2018 4:57 am

After using the MM7 client (based on the sample code) to submit to a NowSMS MMSC, we got below exception randomly.
The MMS still got sent through, but we can't get the SubmitResponse because of the exception.

Exception:
"The server committed a protocol violation. Section=ResponseStatusLine"

According to our research, this seems to be an issue with httpwebrequest's "KeepAlive" or "useUnsafeHeaderParsing"
https://social.msdn.microsoft.com/Forum ... arpgeneral

javabeanz
Posts: 2
Joined: Sat Apr 14, 2018 4:43 am

Re: Exception when submitting MM7 request

Post by javabeanz » Tue Apr 17, 2018 2:42 am

Hi,

To add on

The desktop demo project does not get the error when connecting to the same MMSC server
However, when using the library as a MM7 client in a web application, the response sometimes ok, but most of the time we get below exception

02:36:39: ERROR: 68: (MM7Client) Message sending failed., Exception: System.Net.WebException: The server committed a protocol violation. Section=ResponseStatusLine
at System.Net.HttpWebRequest.GetResponse()
at Inetlab.MMS.MM7Client.fChbNhseILb9GZnK2bG(Object )
at Inetlab.MMS.MM7Client.JL8zyhSHe(MediaMessage )

alt
Site Admin
Posts: 726
Joined: Tue Apr 25, 2006 9:45 am

Re: Exception when submitting MM7 request

Post by alt » Fri Apr 20, 2018 7:27 pm

Hi javabeanz,

I have made some changes in the version 0.10.0.
You can create subclass from MM7Client class and override method GetWebRequest to customize web request before sending.

Post Reply