End Google Ads 201810 - BS.net 01 --> Hi there

I can't get Exchange webservice for Exchange 2007 SP1 working

http://msdn.microsoft.com/en-us/libr...CHG.80%29.aspx[^]

when I run the following C# code:


ExchangeService service = new ExchangeService();
service.Credentials = new WebCredentials(@"username", "password", "domain");
//(obviously in my code i am using the correct credentials)
service.AutodiscoverUrl("username@domain.co.za");


FindItemsResults findResults =
service.FindItems(WellKnownFolderName.Inbox,new ItemView(10));
foreach (Item item in findResults.Items)
{
// Do something with the item.
}

It get this error:

Request failed. The remote server returned an error: (401) Unauthorized.

Any help will be greatly appreciate !!

Thanks in advance.