Creating a web page that will connect to Exchange Web service and retrieve current user's Inbox items. The authentication needs to be integrated. We don't want anyone to login.
Configured IIS to do Windows Authentication and set below parameters in web.config.
This got it working but only if the website is called on the server where it's hosted. If I call the same exact URL on another workstation, I get (401) Unauthorized.
If the page correctly authenticates itself against exchange when executed on the host server, why doesn't the same thing work when the same page is called from client workstation? The windows/domain logon user id is the same in both cases. Below is how the code authenticates against Exchange.
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
service.Url = new Uri("https://hostname/EWS/Exchange.asmx");
service.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
Does anyone have an idea of what could be the culprit here? Thanks!