I have a very strange issue. This code:
....
exchangeService [i].Credentials = new WebCredentials( "user", "pwd" );
exchangeService [i].AutodiscoverUrl( "the-user-email-address" );
Running it on C: hard drive it works fine and I can add new entries to the calendar.
Running it on a any network drive the AutodiscoverUrl()
throws the error:
The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
The content of the directories [HDD & Network] in which the program is located is equal!
My question: What can be the reason this very simple program cannot be ran on a network drive?
Update:
It is running on Windows Server 2012 R2 and the network drive is a NFS drive which was connected via mount ...
OK, dear Microsoft, this is a mystery:
It does not work on a NFS drive. When I try it on a samba network drive then it works. I don't believe even Microsoft could explain why it does not work on a NFS network drive.