我需要以下例外的帮助。我正在尝试使用basicHttpSecurity等来使用Web WCF Web服务。我查看了Mono的Dev Pipe,以及我正在使用的工作部分。Mono使用WCF服务失败ServiceClient Linux
因此,试图消费的服务是AccountService.svc。生成的代理具有我正在使用的AccountServiceClient()对象。在创建对象的那一行,它会抛出一个异常,并且没有办法调试并进入该构造器。
奇怪的是,我可以通过IIS在Windows机器上使用此服务。我也可以使用我的Mac PC使用mod单声道扩展等。但不在Ubuntu Linux机器上。任何人都可以对此有所了解吗?任何人都可以解释为什么会发生?我该如何解决?
我创建了一个新的客户端实例。
client = new AccountServiceClient();
的AccountServiceClient()sniplet
public partial class AccountServiceClient : System.ServiceModel.ClientBase<EServicesAccountProxy.IAccountService>, EServicesAccountProxy.IAccountService
获取引发的异常。
System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
at System.Reflection.Assembly.GetTypes() [0x00000] in <filename unknown>:0
at System.ServiceModel.Configuration.ConfigUtil.GetTypeFromConfigString (System.String name, NamedConfigCategory category) [0x00000] in <filename unknown>:0
at System.ServiceModel.ChannelFactory.ApplyConfiguration (System.String endpointConfig) [0x00000] in <filename unknown>:0
at System.ServiceModel.ChannelFactory.InitializeEndpoint (System.String endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0
at System.ServiceModel.ChannelFactory`1[EServicesAccountProxy.IAccountService]..ctor (System.String endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0
at System.ServiceModel.ClientBase`1[EServicesAccountProxy.IAccountService].Initialize (System.ServiceModel.InstanceContext instance, System.String endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) [0x00000] in <filename unknown>:0
at System.ServiceModel.ClientBase`1[EServicesAccountProxy.IAccountService]..ctor (System.ServiceModel.InstanceContext instance, System.String endpointConfigurationName) [0x00000] in <filename unknown>:0
at System.ServiceModel.ClientBase`1[EServicesAccountProxy.IAccountService]..ctor (System.ServiceModel.InstanceContext instance) [0x00000] in <filename unknown>:0
at System.ServiceModel.ClientBase`1[EServicesAccountProxy.IAccountService]..ctor() [0x00000] in <filename unknown>:0
at EServicesAccountProxy.AccountServiceClient..ctor() [0x00000] in <filename unknown>:0
at TCShared.TCInsuranceSystem_EGW.GetAccount (TCShared.TCInsuranceSystemAccount objInsuranceSystemAccount) [0x00000] in <filename unknown>:0
我注意到一个奇怪的事情也是我也得到一个LoaderException(System.TypeLoadException)。我不知道它是否相关,因为消息说它无法从'Npgsql.VisualStudio,vserion = 2.0.2.1,culture-neutral,PublicKeyToken = null'加载类型'Npgsql.VisualStudio.NpgsqlObjectSelector'。我甚至没有使用VisualStudio,即时通讯在我的Windows机器上使用monodevelop和XamarinStudio。
异常消息来源,她说,如果来自“mscorelib”
任何帮助将不胜感激。