#unity调用C#类库,C#的类库里面使用了服务引用访问WCF接口,但是报错了
"System.InvalidOperationException: Client endpoint configuration '*' was not found in 0 endpoints.\r\n at System.ServiceModel.ChannelFactory.ApplyConfiguration (System.String configurationName)
[0x000ba] in :0 \r\n at System.ServiceModel.ChannelFactory.InitializeEndpoint (System.String configurationName, System.ServiceModel.EndpointAddress address)
[0x00021] in :0 \r\n at System.ServiceModel.ChannelFactory1[TChannel]..ctor (System.String endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) [0x00014] in <bad73233bade47d3a5ff9a7551b83ae9>:0 \r\n at System.ServiceModel.ClientBase
1[TChannel].Initialize (System.ServiceModel.InstanceContext instance, System.String endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress)
[0x00000] in :0 \r\n at System.ServiceModel.ClientBase1[TChannel]..ctor (System.ServiceModel.InstanceContext callbackInstance, System.String endpointConfigurationName) [0x00022] in <bad73233bade47d3a5ff9a7551b83ae9>:0 \r\n at System.ServiceModel.ClientBase
1[TChannel]..ctor (System.ServiceModel.InstanceContext callbackInstance)
[0x00000] in :0 \r\n at System.ServiceModel.ClientBase`1[TChannel]..ctor ()
[0x00000] in :0 \r\n at Unitop.UnityInteractiveBase.ServiceReference1.LxysDataServiceClient..ctor ()
查了很多不知道怎么办,希望有猿神帮忙解决下,给些建议
可以用unity的wsdl.exe生成相关的代码模块之后引用到C#的类库中,猜测是因为unity是基于mono实现的,应该是无法支持 ASP.NET Web 服务应用程序。之后就可以了
Client endpoint configuration '*' was not found in 0 endpoints.\r\n at System.ServiceModel.ChannelFactory.ApplyConfiguration (System.String configurationName)
检查下配置文件吧
wcf的端点没有配置对