views:

170

answers:

2

I have a .NET 2.0 ClickOnce application that runs in a corporate environment and it's setup to work via Windows Authentication.

So the users download the app via ClickOnce and then it connects to an IIS server and communicates via Web Service calls.

The problem is that for every single call there is a double handshake. The first call yields a 401 and invites the client to negotiate. The second call succeeds since the client sends the authentication token.

Is there anyway to eliminate this double handshake? Because it put a tremendous overhead on the latency of the application and makes it seem very sluggish.

Thanks

+1  A: 

This "double handshake" is a integral part of NTLM's challenge response model. Your only option would be to change the authentication type.

Alternatively, you try re-using the connection for web service calls.

Matt Lynch
+1  A: 

There actually is a solution, it turns out: WebRequest.PreAuthenticate Check out an article by Rick Strahl.

AngryHacker