I've written a webpart for a Sharepoint 2007 installation that accesses an
Exchange 2007 service via Exchange Web Services.
The two servers are on separate machines.
If I create a new NetworkCredential using UserID/Password/Domain, no
problem. It connects and everything works.
If I change the credentials to CredentialCache.DefaultNetworkCredentials I
get an HTTP 401 from the web part.
Here's the code that fails:
Public Function GetServiceBinding(ByVal ExchangeURI As String) As
Exchange2007WS.ExchangeServiceBinding
Try
Dim esb As New Exchange2007WS.ExchangeServiceBinding()
esb.PreAuthenticate = True
esb.Credentials = CredentialCache.DefaultNetworkCredentials
esb.Url = ExchangeURI
Return esb
Catch ex As Exception
Throw
End Try
End Function
Is it the double-hop issue, NTLM's inablility to delegate its credentials
from one machine to the other? The two servers are part of the same domain.
Thanks in advance,
Mike
Yes, it was the double-hop.
To make it work I enabled ExchangeImpersonation.
"milop" <mi...@slomins.com> wrote in message
news:eMqUzpae...@TK2MSFTNGP02.phx.gbl...