Hi,
We are trying to use the library in a .net core function project. But we get below error
The type initializer for 'Inetlab.MMS.MMSMessage' threw an exception.
---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
File name: 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
at s5vEEkOOTYfpG8HoP9V.JuPp3jOJKI8hNvrs3dX.n5YXMFyn5g(Byte[] )
at s5vEEkOOTYfpG8HoP9V.JuPp3jOJKI8hNvrs3dX.GetLicense(LicenseContext , Type , Object , Boolean )
at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
at System.ComponentModel.LicenseManager.Validate(Type type)
at Inetlab.MMS.MMSMessage.wvQ9sK8TPl7hekoNwQI(Type )
at Inetlab.MMS.MMSMessage..cctor()
The type initializer for 'Inetlab.MMS.MMSMessage' threw an exception
Moderator: alt
Re: The type initializer for 'Inetlab.MMS.MMSMessage' threw an exception
That works!
However when sending MMS, it seems we will get below error for the first MMS. Subsequent MMS is ok.
System.ArgumentException: Item has already been added. Key in dictionary: 'binary' Key being added: 'binary' at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) at System.Collections.Hashtable.Add(Object key, Object value) at Inetlab.MMS.MIME.MessageBodyEncoding..ctor() at Inetlab.MMS.MIME.MessageBodyEncoding.GetInstance() at Inetlab.MMS.MIME.MessageBase.Encode(String encoding, Byte[] data) at Inetlab.MMS.MIME.MessageBase.MessageStream(Boolean printHeaders) at Inetlab.MMS.MediaMessage.GetBytes(Boolean includeHeaders) at Inetlab.MMS.MediaMessage.GetBytes() at Inetlab.MMS.MM7Client. (Uri , MediaMessage ) at Inetlab.MMS.MM7Client. (MediaMessage ) at Inetlab.MMS.MM7Client.Submit(MMSMessage message, SubmitRequest req) at Inetlab.MMS.MM7Client.Submit(MMSMessage message, ChargedParty chargedParty) at Inetlab.MMS.MM7Client.Submit(MMSMessage message)
However when sending MMS, it seems we will get below error for the first MMS. Subsequent MMS is ok.
System.ArgumentException: Item has already been added. Key in dictionary: 'binary' Key being added: 'binary' at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) at System.Collections.Hashtable.Add(Object key, Object value) at Inetlab.MMS.MIME.MessageBodyEncoding..ctor() at Inetlab.MMS.MIME.MessageBodyEncoding.GetInstance() at Inetlab.MMS.MIME.MessageBase.Encode(String encoding, Byte[] data) at Inetlab.MMS.MIME.MessageBase.MessageStream(Boolean printHeaders) at Inetlab.MMS.MediaMessage.GetBytes(Boolean includeHeaders) at Inetlab.MMS.MediaMessage.GetBytes() at Inetlab.MMS.MM7Client. (Uri , MediaMessage ) at Inetlab.MMS.MM7Client. (MediaMessage ) at Inetlab.MMS.MM7Client.Submit(MMSMessage message, SubmitRequest req) at Inetlab.MMS.MM7Client.Submit(MMSMessage message, ChargedParty chargedParty) at Inetlab.MMS.MM7Client.Submit(MMSMessage message)
Re: The type initializer for 'Inetlab.MMS.MMSMessage' threw an exception
Thank you for reporting this bug. I'll try to fix it as soon as possible.
Re: The type initializer for 'Inetlab.MMS.MMSMessage' threw an exception
This issue is fixed in the version 1.0.0-beta-2580.
Please note: The method Submit in the MM7Client class is now Task-based.
Please note: The method Submit in the MM7Client class is now Task-based.