For the last hour and a half I have been trying to find a way around a WCF
security problem, as usual. I can't imagine how many hours of my life have
been burned away in tears or knuckle-whitening anger trying to overcome
security problems. Microsoft welds the doors shut and nails the windows
closed to prevent security breaches, fair enough I suppose, but then you
have to make your apps actually work in the face of this obstacle and the
web searches begin... Using simple tcp bindings on the server and client
sides in my app and then trying it over the LAN will give:

 

SecurityNegotiationException: The server has rejected the client
credentials.

Win32Exception: The login attempt failed

 

It's especially confusing because I haven't specified any credentials, I
don't know what the defaults are and I don't know what it means by "login"
in the context of WCF. Web searches on this will burn away many more hours
of your life. I eventually gave up in disgust trying to find an elegant fix
and I just put this on both sides:

 

bind.Security.Mode = SecurityMode.None;

 

This squashes the problem totally. I have implemented by own simple login
handshaking anyway which returns a "ticket" for valid clients to use and
prevent abuse of my service.

 

My next problem will be how to automatically place this "ticket" in a
sideband of all service calls so I don't have to stupidly put them as
arguments to every service call. That should burn some more of my life away.
Anybody know what the trick is for this?

 

Greg

Reply via email to