[Mono-bugs] [Bug 675794] New: TypeLoadException when trying to hit a WCF service
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Feb 28 23:56:25 EST 2011
https://bugzilla.novell.com/show_bug.cgi?id=675794
https://bugzilla.novell.com/show_bug.cgi?id=675794#c0
Summary: TypeLoadException when trying to hit a WCF service
Classification: Mono
Product: MonoDroid
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Runtime
AssignedTo: mkestner at novell.com
ReportedBy: jpetrak at thiess.com.au
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=416679)
--> (http://bugzilla.novell.com/attachment.cgi?id=416679)
Zipped VS2010 test project that contains 3 projects
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
I created a simple .Net 4 WCF service in VS2010. It contains one method called
"Ping" which return a string "Pong". A VS2010 client WPF application hits the
service and it works fine, the string "Pong" is returned. I then created a
MonoDroid Application to hit the same service. Everything compiles fine but
when I call the Ping method I get an error.
Reproducible: Always
Steps to Reproduce:
1. Make a client call to a WCF service.
Actual Results:
Following error is raised
System.TypeLoadException: Could not load type '__clientproxy_IService1' from
assembly 'dummy, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
at System.MonoType.GetMethodImpl (System.String name, BindingFlags
bindingAttr, System.Reflection.Binder binder, CallingConventions
callConvention, System.Type[] types, System.Reflection.ParameterModifier[]
modifiers) [0x00000] in <filename unknown>:0
at System.Type.GetMethod (System.String name, BindingFlags bindingAttr,
System.Reflection.Binder binder, CallingConventions callConvention,
System.Type[] types, System.Reflection.ParameterModifier[] modifiers) [0x00000]
in <filename unknown>:0
at System.Type.GetMethod (System.String name, System.Type[] types) [0x00000]
in <filename unknown>:0
at Mono.CodeGeneration.CodeMethod.UpdateMethodBase (System.Type type)
[0x00000] in <filename unknown>:0
at Mono.CodeGeneration.CodeClass.CreateType () [0x00000] in <filename
unknown>:0
at System.ServiceModel.ProxyGeneratorBase.CreateProxyTypeOperations
(System.Type crtype, Mono.CodeGeneration.CodeClass c,
System.ServiceModel.Description.ContractDescription cd) [0x00000] in <filename
unknown>:0
at System.ServiceModel.ClientProxyGenerator.CreateProxyType (System.Type
requestedType, System.ServiceModel.Description.ContractDescription cd, Boolean
duplex) [0x00000] in <filename unknown>:0
at
System.ServiceModel.ChannelFactory`1[HelloMonoDroid.IService1].CreateChannel
(System.ServiceModel.EndpointAddress address, System.Uri via) [0x00000] in
<filename unknown>:0
at
System.ServiceModel.ChannelFactory`1[HelloMonoDroid.IService1].CreateChannel
(System.ServiceModel.EndpointAddress address) [0x00000] in <filename unknown>:0
at
System.ServiceModel.ChannelFactory`1[HelloMonoDroid.IService1].CreateChannel ()
[0x00000] in <filename unknown>:0
at System.ServiceModel.ClientBase`1[HelloMonoDroid.IService1].CreateChannel
() [0x00000] in <filename unknown>:0
at
System.ServiceModel.ClientBase`1[HelloMonoDroid.IService1].get_InnerChannel ()
[0x00000] in <filename unknown>:0
at System.ServiceModel.ClientBase`1[HelloMonoDroid.IService1].get_Channel ()
[0x00000] in <filename unknown>:0
at HelloMonoDroid.ClientTest.BeginPing (System.AsyncCallback callback,
System.Object asyncState) [0x00000] in <filename unknown>:0
at HelloMonoDroid.Activity1.button_Click (System.Object sender,
System.EventArgs e) [0x00000] in <filename unknown>:0
Expected Results:
The call made to the service and a string "Pong" returned.
I have tried both synchronous and asynchronous calls to the service with the
same error being raised. The error is raised on both the Android emulator and
my HTC desire device.
I could ping the computer the service is hosted on using a 3rd party ping
application I downloaded from the actual Android device.
I have included a VS2010 Solution with 3 projects.
The WCFService, WPFClient, MonoDroidClient
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list