Groups | Blog | Home
all groups > dotnet web services > february 2006 >

dotnet web services : Can NegotiateStream be used to authenticate a client using IE


davesmith
2/22/2006 11:44:02 AM
I have a need for a very simple web server that can authenticate clients
using integrated windows authentication. I have been asked to propose a
solution that doesn't use IIS. I know that HttpListener is a good option, but
I need support for Win2K. I tried putting together a simple server that uses
NegotiateStream, but when I try to access it with IE everything just hangs on
the AuthenticateAsServer call. Is what I'm trying to do even possible. Any
help or alternate solutions would be greatly appreciated.

stcheng NO[at]SPAM online.microsoft.com
2/23/2006 12:00:00 AM
Hi David,

Welcome to the MSDN newsgroup.

As for the NegoticateStream, it is a very basic component for performing
Negociate authentication against a given stream. And when the serverside
call AuthenticateAsServer, it'll require the clientside also do the
AuthenticateAsClient to react to it, if not, the communicate can not
continue. So this is suitable for the scenario that both the client and
server applications are our own .net applcation so that we can control the
authentication steps in code to let client and server work seamlessly.
While when using IE as the client, IE browser will send message according
to the http protocol, so in our server application, we need to first use a
TCP Listener to accept the IE request, and then work with it according to
the http protocol specification, and when going to the authentication step,
we then need to forward the Tcp network stream to NegociateStream for
authentication. This is much more complex than simple do the
AuthenticateAsClient in our own client .net application. So I think so far
for non-XP or non-windows 2003 server OS( which doesn't support
HttpListener) we haven't any better means to do this through .NET
framework's base class library.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
AddThis Social Bookmark Button