别问我菜 2023-05-09 15:56 采纳率: 50%
浏览 15
已结题

unity和C#问题不知道怎么解决

#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.ClientBase1[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.ClientBase1[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 ()

查了很多不知道怎么办,希望有猿神帮忙解决下,给些建议

  • 写回答

2条回答 默认 最新

  • 别问我菜 2023-05-16 10:17
    关注

    可以用unity的wsdl.exe生成相关的代码模块之后引用到C#的类库中,猜测是因为unity是基于mono实现的,应该是无法支持 ASP.NET Web 服务应用程序。之后就可以了

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 5月24日
  • 已采纳回答 5月16日
  • 创建了问题 5月9日