yck1509 / ConfuserEx

An open-source, free protector for .NET applications
http://yck1509.github.io/ConfuserEx/
Other
3.57k stars 1.64k forks source link

The empty string '' is not a valid local name #481

Open bbday opened 8 years ago

bbday commented 8 years ago

I have this issue if i enable rename on confuser when i call my wcf request:

The empty string '' is not a valid local name.

Parameter name: name at System.Xml.XmlConvert.VerifyNCName(String name, ExceptionType exceptionType) at System.ServiceModel.Description.XmlName.ValidateEncodedName(String name, Boolean allowNull) at System.ServiceModel.Description.MessagePartDescription..ctor(String name, String ns) at System.ServiceModel.Description.TypeLoader.CreateParameterPartDescription(XmlName defaultName, String defaultNS, Int32 index, ICustomAttributeProvider attrProvider, Type type) at System.ServiceModel.Description.TypeLoader.CreateParameterMessageDescription(ParameterInfo[] parameters, Type returnType, ICustomAttributeProvider returnAttrProvider, XmlName returnValueName, String methodName, String defaultNS, String action, XmlName wrapperName, String wrapperNamespace, MessageDirection direction) at System.ServiceModel.Description.TypeLoader.CreateMessageDescription(MethodInfo methodInfo, Boolean isAsync, Boolean isTask, Type taskTResult, XmlName returnValueName, String defaultNS, String action, XmlName wrapperName, String wrapperNamespace, MessageDirection direction) at System.ServiceModel.Description.TypeLoader.CreateOperationDescription(ContractDescription contractDescription, MethodInfo methodInfo, MessageDirection direction, ContractReflectionInfo reflectionInfo, ContractDescription declaringContract) at System.ServiceModel.Description.TypeLoader.CreateOperationDescriptions(ContractDescription contractDescription, ContractReflectionInfo reflectionInfo, Type contractToGetMethodsFrom, ContractDescription declaringContract, MessageDirection direction) at System.ServiceModel.Description.TypeLoader.CreateContractDescription(ServiceContractAttribute contractAttr, Type contractType, Type serviceType, ContractReflectionInfo& reflectionInfo, Object serviceImplementation) at System.ServiceModel.Description.TypeLoader.LoadContractDescriptionHelper(Type contractType, Type serviceType, Object serviceImplementation) at System.ServiceModel.ChannelFactory1.CreateDescription() at System.ServiceModel.ChannelFactory.InitializeEndpoint(Binding binding, EndpointAddress address) at System.ServiceModel.ChannelFactory1..ctor(Binding binding, EndpointAddress remoteAddress) at System.ServiceModel.ClientBase`1..ctor(Binding binding, EndpointAddress remoteAddress) at o!\Bt'*0Csi"T@T.K"}(_"!^..k8W^oV7<^h&#REc|\=&w.JJ}".MoveNext()

gotagit commented 7 years ago

I have the same issue here with my WPF/WCF App.

Any idea how to solve this?

bei System.Xml.XmlConvert.VerifyNCName(String name, ExceptionType exceptionType)
   bei System.ServiceModel.Description.XmlName.ValidateEncodedName(String name, Boolean allowNull)
   bei System.ServiceModel.Description.MessagePartDescription..ctor(String name, String ns)
   bei System.ServiceModel.Description.TypeLoader.CreateParameterPartDescription(XmlName defaultName, String defaultNS, Int32 index, ICustomAttributeProvider attrProvider, Type type)
   bei System.ServiceModel.Description.TypeLoader.CreateParameterMessageDescription(ParameterInfo[] parameters, Type returnType, ICustomAttributeProvider returnAttrProvider, XmlName returnValueName, String methodName, String defaultNS, String action, XmlName wrapperName, String wrapperNamespace, MessageDirection direction)
   bei System.ServiceModel.Description.TypeLoader.CreateMessageDescription(MethodInfo methodInfo, Boolean isAsync, Boolean isTask, Type taskTResult, XmlName returnValueName, String defaultNS, String action, XmlName wrapperName, String wrapperNamespace, MessageDirection direction)
   bei System.ServiceModel.Description.TypeLoader.CreateOperationDescription(ContractDescription contractDescription, MethodInfo methodInfo, MessageDirection direction, ContractReflectionInfo reflectionInfo, ContractDescription declaringContract)
   bei System.ServiceModel.Description.TypeLoader.CreateOperationDescriptions(ContractDescription contractDescription, ContractReflectionInfo reflectionInfo, Type contractToGetMethodsFrom, ContractDescription declaringContract, MessageDirection direction)
   bei System.ServiceModel.Description.TypeLoader.CreateContractDescription(ServiceContractAttribute contractAttr, Type contractType, Type serviceType, ContractReflectionInfo& reflectionInfo, Object serviceImplementation)
   bei System.ServiceModel.Description.TypeLoader.LoadContractDescriptionHelper(Type contractType, Type serviceType, Object serviceImplementation)
   bei System.ServiceModel.ChannelFactory`1.CreateDescription()
   bei System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)
   bei System.ServiceModel.DuplexChannelFactory`1..ctor(Object callbackObject, String endpointConfigurationName, EndpointAddress remoteAddress)
   bei System.ServiceModel.ConfigurationEndpointTrait`1.CreateDuplexFactory()
   bei System.ServiceModel.ConfigurationEndpointTrait`1.CreateChannelFactory()
   bei System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)
   bei System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()
   bei System.ServiceModel.ClientBase`1..ctor(InstanceContext callbackInstance)
   bei rIpEEyAbFZbqQXfIQyGOwnKTUdqVA.oBiLWYEGBZYvOZgkPpHsXOqXYUZI..ctor() in D:\Projects\{...}\ServiceConnection.cs:Zeile 14.