I have written a WCF service that is hosted in a console application. The\nclient is a asp.net application. I am exposing two endpoint, one is using\nwshttpbinding and other is using nettcpbinding. Both are listening on\ndifferent ports and have the defualt bindings. So my understanding is that\nwith wshttpbinding, I will get message security and with tcp I would get\ntransport securtiy. My code works fine when both the client and server are\nrun on the same machine but when the client is running on a remote machine\nit gives me the following error\n\n"The caller was not authenticated by the service. "\n\nBelow is the app.config of the host running the service\n\n<system.serviceModel>\n<bindings>\n<wsHttpBinding>\n<binding name="BasicHttpBinding">\n<security mode="Message">\n<transport clientCredentialType="Basic" />\n</security>\n</binding>\n</wsHttpBinding>\n</bindings>\n<services>\n<service behaviorConfiguration="MyService1Behavior"\nname="ObjRetrievalService">\n<endpoint address="ServiceViaWindowAuthHttp" binding="wsHttpBinding"\nname="HttpWindowAuthSPObjRetrieval" contract="IObjRetrievalService"\nlistenUriMode="Explicit"></endpoint>\n<endpoint address="ServiceViaWindowAuthTcp" binding="netTcpBinding"\nname="TCPWindowAuthSPObjRetrieval" contract="IObjRetrievalService" />\n<endpoint address="ServiceViaBasicAuthHttp" binding="wsHttpBinding"\nbindingConfiguration="BasicHttpBinding" name="HttpBasicAuthSPObjRetrieval"\ncontract="IObjRetrievalService" />\n<host>\n<baseAddresses>\n<add baseAddress="[URL]http://my-server:11021[/URL]" />\n<add baseAddress="net.tcp://my-server:11052" />\n</baseAddresses>\n</host>\n</service>\n</services>\n<behaviors>\n<serviceBehaviors>\n<behavior name="MyService1Behavior">\n<serviceMetadata httpGetEnabled="True"/>\n<serviceDebug includeExceptionDetailInFaults="true" />\n</behavior>\n</serviceBehaviors>\n</behaviors>\n</system.serviceModel>\n\nBelow is the client code\n\nWSHttpBinding bindingElement = new WSHttpBinding(SecurityMode.Message);\nproxy = new ObjRetrievalServiceClient(bindingElement, new\nEndpointAddress(UriAddress)));\n\nWhat I want is that if on the login screen the user indicate that his\ncurrent login credentials should be use then he does not need to supply\nusername and password and in that scenario the first endpoint( on the server\nconfig) will be used but if the user indicate userid/password on the login\nform then the client app should communicate with the server by using the\nthird endpoint(server config). Since this application will be running in our\nintranet, it makes sense to do a single sign on and the identity associated\nwith window login should be use for service authentication.\nCan please help me and point me in some direction of what I am doing wrong.