Tôi có dịch vụ wcf sẽ chỉ hoạt động khi tôi triển khai dịch vụ đó đến máy chủ và định cấu hình thông qua IIS. có thông báo lỗi tôi nhận được khi chạy nó thông qua IIS nhanh là:Không thể chạy dịch vụ WCF trên Máy cục bộ
The authentication schemes configured on the host ('Ntlm, Anonymous') do not allow those configured on the binding 'BasicHttpBinding' ('Negotiate'). Please ensure that the SecurityMode is set to Transport or TransportCredentialOnly. Additionally, this may be resolved by changing the authentication schemes for this application through the IIS management tool, through the ServiceHost.Authentication.AuthenticationSchemes property, in the application configuration file at the element, by updating the ClientCredentialType property on the binding, or by adjusting the AuthenticationScheme property on the HttpTransportBindingElement.
dịch vụ web.config My binging trông như thế này:
<services>
<service name="LMS.Services.Services.AppService" behaviorConfiguration="LargeDataRequestBehavior">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttp_LargeDataRequestBinding" contract="LMS.Services.Services.AppService" />
<endpoint address="mex" binding="basicHttpBinding" bindingConfiguration="basicHttp_LargeDataRequestBinding" contract="IMetadataExchange" />
</service> </services>
và vẻ ràng buộc của tôi như thế này:
<bindings>
<basicHttpBinding>
<binding name="basicHttp_LargeDataRequestBinding" receiveTimeout="01:00:00" sendTimeout="01:00:00" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" >
</transport>
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<basicHttpBinding>
</bindings>
Mọi trợ giúp sẽ được đánh giá cao.
Điều đó đã làm cho nó hoạt nhưng gây ra một vấn đề khác về sự kêu gọi dịch vụ proxy bên cho gói Silverlight. Bây giờ tôi nhận được lỗi này: Thông báo với hành động 'urn: AppService/GetTemplatesByCategory' không thể được xử lý tại người nhận, do một sự không khớp ContractFilter tại EndpointDispatcher. Điều này có thể là do sự không khớp hợp đồng (hành động không khớp giữa người gửi và người nhận) hoặc sự không khớp ràng buộc/bảo mật giữa người gửi và người nhận. Kiểm tra xem người gửi và người nhận có cùng một hợp đồng và cùng một ràng buộc (yêu cầu bảo mật, ví dụ như Message, Transport, None – greektreat
không bao giờ nhận xét cuối cùng của tôi, tôi đã thay đổi url của dịch vụ trong ứng dụng của tôi do nhầm lẫn! – greektreat
Hi Aron. '/' trong thẻ đóng cơ bảnHttpBinding. Lỗi đánh máy làm cho XML không hợp lệ. SO sẽ không cho phép tôi chỉnh sửa một ký tự đơn lẻ hoặc tôi chỉ tự khắc phục sự cố đó –