Tagged: silverlight
- This topic has 6 replies, 3 voices, and was last updated 11 years, 3 months ago by Anonymous.
-
AuthorPosts
-
August 20, 2013 at 10:34 #1049AnonymousInactive
dear
i can not use Networkcomms Dll in a Silverlight Application, it return an error at:
ChatMessage messageToSend = new ChatMessage(NetworkComms.NetworkIdentifier, localName, toSend, messageSendIndex++);
the error message is:System.TypeInitializationException was unhandled by user code Message=The type initializer for 'NetworkCommsDotNet.NetworkComms' threw an exception. TypeName=NetworkCommsDotNet.NetworkComms StackTrace: at NetworkCommsDotNet.NetworkComms.get_NetworkIdentifier() at ExamplesSLChat.MainPage.SendMessage(String toSend) at ExamplesSLChat.MainPage.Button_Click(Object sender, RoutedEventArgs e) at System.Windows.Controls.Primitives.ButtonBase.OnClick() at System.Windows.Controls.Button.OnClick() at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e) at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags) InnerException: System.MethodAccessException Message=Attempt by method 'DPSBase.DPSManager.AddDataProcessor<System.__Canon>()' to access method 'SevenZipLZMACompressor.LZMACompressor..ctor()' failed. StackTrace: at System.RuntimeMethodHandle.PerformSecurityCheck(Object obj, RuntimeMethodHandleInternal method, RuntimeType parent, UInt32 invocationFlags) at System.RuntimeMethodHandle.PerformSecurityCheck(Object obj, IRuntimeMethodInfo method, RuntimeType parent, UInt32 invocationFlags) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at DPSBase.DPSManager.AddDataProcessor[T]() at NetworkCommsDotNet.NetworkComms..cctor() InnerException:
please help me. thanks
August 28, 2013 at 19:07 #1052AnonymousInactiveWe are looking into this.
Regards,
MarcAugust 28, 2013 at 19:08 #1053AnonymousInactiveCould you please give us a little more information as to the type of Silverlight application you are developing and also what your development environment is?
September 10, 2013 at 21:03 #1063AnonymousInactiveI am having the same exact error. I am testing with a brand new silverlight 5 application where the only line of code is the send object command. I am using VS2012.
September 10, 2013 at 21:11 #1064AnonymousInactiveAh, I have discovered the issue.
The LZMACompressor constructor is private. The silverlight reflection runtime , unlike the full .net runtime, does not allow you to reflect over or invoke private methods. This was done to protect the internal silverlight runtime as it is run in the web and should never be compromised. Setting the constructor to public should fix the issue.
September 11, 2013 at 11:22 #1066AnonymousInactiveHeya Dbaile10,
Are you able to test this fix using the source download?
Regards,
MarcSeptember 12, 2013 at 19:09 #1067AnonymousInactiveUnfortunately no. I can edit the source, but I need windows 8 to compile. I could fire up a VM but my job has me working some long hours at the moment and I wouldn’t be able to get to it until sometime next week.
-
AuthorPosts
- You must be logged in to reply to this topic.