c# - Why is my WCF wshttpbinding client doesn't work at another computer? -


First of all, I host my wcf service in winform and I try to use wsHttpBinding. The My Client application works only in my development computer because my WCF wshttpbinding client does not work on another computer?

This is my WCF winform host configuration (app.config):

  In another computer it is shown that "the caller was not authenticated by the service" Lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Configuration & gt; & Lt; Startup & gt; & Lt; Supported serial version = "v4.0" sku = ".NETFramework, version = v4.5" /> & Lt; / Startup & gt; & Lt; ConnectionStrings & gt; & Lt; Add name = "DBCS" connectionString = "data source = localhost; database = LatihanSP; integrated security = SSPI" provider name = "System.Data.SqlClient" /> & Lt; / ConnectionStrings & gt; & Lt; System.serviceModel & gt; & Lt; Behavior & gt; & Lt; ServiceBehaviors & gt; & Lt; Transaction name = "XServerSvcBehavior" & gt; & Lt; Service debug includes ExceptionDetailInFaults = "true" /> & Lt; ServiceMetadata httpGetEnabled = "true" /> & Lt; / Behavior & gt; & Lt; / ServiceBehaviors & gt; & Lt; / Behavior & gt; & Lt; Services & gt; & Lt; Service transaction statement = "Excerver SVCBehair" name = "server-level.seva client" & gt; & Lt; Endpoint address = "" bond = "wsHttpBinding" bindingConfiguration = "" name = "XServerSvcBasicHttpEndPoint" contract = "ServerTier.IServiceClient" /> & Lt; Endpoint address = "MEX" binding = "mexHttpBinding" bindingConfiguration = "" name = "XServerSvcMexHttpEndPoint" contract = "IMetadataExchange" /> & Lt; Host & gt; & Lt; BaseAddresses & gt; & Lt; BaseAddress = "http: // localhost: 7777 / sample SVC" /> Add & lt; / BaseAddresses & gt; & Lt; / Host & gt; & Lt; / Services & gt; & Lt; / Services & gt; & Lt; /system.serviceModel> & Lt; / Configuration & gt;  

And my client application config

   & Lt; / Startup & gt; & Lt; System.serviceModel & gt; & Lt; Binding & gt; & Lt; WsHttpBinding & gt; & Lt; Binding name = "Excerver SVCBasic HTPointPoint" / & gt; & Lt; / WsHttpBinding & gt; & Lt; / Binding & gt; & Lt; Customers & gt; & Lt; Endpoint address = "http: // localhost: 7777 / SampleSvc" binding = "wsHttpBinding" bindingConfiguration = "XServerSvcBasicHttpEndPoint" contract = "ServiceRef.IServiceClient" name = "XServerSvcBasicHttpEndPoint" & gt; & Lt; Identity & gt; & Lt; UserPrincipalName value = "Kevin-EDP \ Kevin" /> & Lt; / Identification & gt; & Lt; / Endpoint & gt; & Lt; / Customer & gt; & Lt; /system.serviceModel> & Lt; / Configuration & gt;  

I try to change the userPrincipalName value by the name of the computer, but my customer will not work, when I perform the service, it is shown that "the caller is not authenticated. The service was done "I'm really sure that my code is working, when I use basicHttpBinding, and when I suggest some solution on the Internet, most of the people use HttpBinding, but that this question Answer in I do not want to see, I want to use wsHttpBinding for security reasons

Helping people, I'm stuck for about 3 days, still do not understand it

after

Do not set any security mode You can create a binding configuration element in the WCF service config file

  & lt; WsHttpBinding & gt; & Lt; Binding name = "XServerSvcBasicHttpEndPoint" & gt; & Lt; Safety Mode = "None" & gt; & Lt; / Safety & gt; & Lt; / Binding & gt; & Lt; / WsHttpBinding & gt; Using the configuration in the end point tag like  

and

  & lt; Endpoint address = "" bond = "wsHttpBinding" bindingConfiguration = "XServerSvcBasicHttpEndPoint" name = "XServerSvcBasicHttpEndPoint" contract = "ServerTier.IServiceClient" />  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -