< readerQuotas maxDepth = " 200 " maxStringContentLength = " 1000000 " maxArrayLength = " 50000 " maxBytesPerRead = " 4096 " maxNameTableCharCount = " 16384 " />< reliableSession 订购 = " true " > inactivityTimeout = " 00:10:00 " 已启用 = " false " />< 安全性 模式 = " 消息 " > >< 运输 clientCredentialType = " Windows " proxyCredentialType = " 无 " 领域 = "" ; />< 消息 clientCredentialType = " UserName " > negotiateServiceCredential = " 否 " algorithmSuite = " 默认 " 建立SecurityContext = " true " /></ 安全性 ></ 绑定 ></ wsHttpBinding ></ 绑定 >< 客户端 >< 端点 地址 = http://ClientIPAddress/webService/UserLoginLogoutService.svc 绑定 = " wsHttpBinding " bindingConfiguration = " wsHttpUserNameCredential " 合同 = " Client.ClientDetails.ServiceContracts.IUserLoginLogoutService " 名称 = " WSHttpBinding_IUserLoginLogoutService " >< 身份 >< 证书 encodedValue = " AwAAAAEAAAAUAAAADGGMlzc8Xgq8SHnv7WhbjjJUoewgAAAAAQAAAL0BAAAwggG5MIIBZ6ADAgECAhBL39wu0UkIpEu4bZIMG5gKMAkGBSsOAwIdBQAwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3kwHhcNMDcwMjIxMTYwOTE2WhcNMzkxMjMxMjM1OTU5WjAcMRowGAYDVQQDExFXZWJQRE1UZXN0U2VydmVyMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA78gD1vCbjoftBpFhgySkUrlN1v9bHAckEdrgs7z3XOfXQdGye27qa4A0FxQdEcmkvU/FN +米/xJIoiTveaE9xeh3QVcuS1BtZSlDDcVwYfFpODZfSb9GO0rjQ/bOtoAuyNZStpJag2sq4spvNdXSOw1zQwkYjXoFpzpbyiG24n5sCAwEAAaNLMEkwRwYDVR0BBEAwPoAQEuQJLQYdHU8AjWEh3BZkY6EYMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5ghAGN2wAqgBkihHPuNSqXDX0MAkGBSsOAwIdBQADQQBGpUxSV2OD40jvBzIODy/GfHNYbsPLZFaeu2VeGRUN5fSnZJh/FRta7f/V8IfuzTtlH0kj6cux/+ CIImioB2 + U " /></ 身份 ></ 端点 ></ 客户端 ></ system.serviceModel ></ 配置 > 如果我删除了application.exe.config,则从应用程序部分得到了相同的错误,由于未找到配置文件,它甚至没有命中Web服务,但是我已经放置了所有引用的dll和classlibrary和classlibrary.dll.cofig在同一路径中 有人可以建议我我要去哪里哪里 谢谢 Srinivas 解决方案 斯里, 您可以发布解决方案吗? Damir Hi All,I am new to the web services and have similiar problem related to the Web ServiceI have the client dll and app.config file which can directly call their webservice I have created the Win Forms app, added config file and the dll to the referencesOn click it hits the web service and returns me the required results, till here it WORKS FINEthe problem:i need to create a (test) class library which will be accessed from the WebOrb console to get it workcreated a new classlibrary, added the app.config and the dll to the referencesi copied the working code from the application and compiled it into a dll (no errors)In the bin\debug\ i get 3 files, the client dll, test.dll (class library) and test.dll.configi copied all the 3 files to the inetput\wwwroot\weborb30\bin folderwhen i open the weborbconsole and browse the class, and invoke the method i get this errorCould not find endpoint element with name 'WSHttpBinding_IUserLoginLogoutService' and contract 'Client.ClientDetails.ServiceContracts.IUserLoginLogoutService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element.My Code//Common CodeChannelFactory<'Client.ClientDetails.ServiceContracts.IUserLoginLogoutService> channelFactory = new ChannelFactory<'Client.ClientDetails.ServiceContracts.IUserLoginLogoutService>("WSHttpBinding_IUserLoginLogoutService");channelFactory.Credentials.UserName.UserName = UserName;channelFactory.Credentials.UserName.Password = Password;'Client.ClientDetails.ServiceContracts.IUserLoginLogoutService service = channelFactory.CreateChannel();'Client.ClientDetails.ServiceContracts.UserLoginLogout.LoginUserResponse response = service.LoginUser(new 'Client.ClientDetails.ServiceContracts.UserLoginLogout.LoginUserRequest());personId = response.PersonId;App.config<?xml version="1.0" encoding="utf-8" ?><configuration><configSections></configSections><system.serviceModel><bindings><wsHttpBinding><binding name="wsHttpUserNameCredential" closeTimeout="00:01:00"openTimeout="00:05:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"maxBufferPoolSize="524288" maxReceivedMessageSize="5000000" messageEncoding="Text"textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"><readerQuotas maxDepth="200" maxStringContentLength="1000000" maxArrayLength="50000"maxBytesPerRead="4096" maxNameTableCharCount="16384" /><reliableSession ordered="true" inactivityTimeout="00:10:00"enabled="false" /><security mode="Message"><transport clientCredentialType="Windows" proxyCredentialType="None"realm="" /><message clientCredentialType="UserName" negotiateServiceCredential="false"algorithmSuite="Default" establishSecurityContext="true" /></security></binding></wsHttpBinding></bindings><client><endpoint address=http://ClientIPAddress/webService/UserLoginLogoutService.svcbinding="wsHttpBinding" bindingConfiguration="wsHttpUserNameCredential"contract="Client.ClientDetails.ServiceContracts.IUserLoginLogoutService"name="WSHttpBinding_IUserLoginLogoutService"><identity><certificate encodedValue="AwAAAAEAAAAUAAAADGGMlzc8Xgq8SHnv7WhbjjJUoewgAAAAAQAAAL0BAAAwggG5MIIBZ6ADAgECAhBL39wu0UkIpEu4bZIMG5gKMAkGBSsOAwIdBQAwFjEUMBIGA1UEAxMLUm9vdCBBZ2VuY3kwHhcNMDcwMjIxMTYwOTE2WhcNMzkxMjMxMjM1OTU5WjAcMRowGAYDVQQDExFXZWJQRE1UZXN0U2VydmVyMjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA78gD1vCbjoftBpFhgySkUrlN1v9bHAckEdrgs7z3XOfXQdGye27qa4A0FxQdEcmkvU/FN+m/xJIoiTveaE9xeh3QVcuS1BtZSlDDcVwYfFpODZfSb9GO0rjQ/bOtoAuyNZStpJag2sq4spvNdXSOw1zQwkYjXoFpzpbyiG24n5sCAwEAAaNLMEkwRwYDVR0BBEAwPoAQEuQJLQYdHU8AjWEh3BZkY6EYMBYxFDASBgNVBAMTC1Jvb3QgQWdlbmN5ghAGN2wAqgBkihHPuNSqXDX0MAkGBSsOAwIdBQADQQBGpUxSV2OD40jvBzIODy/GfHNYbsPLZFaeu2VeGRUN5fSnZJh/FRta7f/V8IfuzTtlH0kj6cux/+CIImioB2+U" /></identity></endpoint></client></system.serviceModel></configuration>From the application part if i remove application.exe.config i get the same error, which doesnt even hit the webservice because of not finding the config filebut i have place all referred dlls and the classlibrary and the classlibrary.dll.cofig in the same pathCan some one suggest me where am i going wrongThanksSrinivas 解决方案 Hi Sri,can you post the solution?Damir 这篇关于使用+ Web服务(SVC)+ C#DLL找不到端点元素名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-06 01:56