0
votes

I was using Outlook COM component to create an appointment, but it was causing many problems on IIS related to security, etc. So, I am using the Microsoft Exchange Services dll.

In the following code, I have to give the domain name, which I don't want to do, because it will be different for every client.

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
    service.Credentials = new WebCredentials("username", "password");
    service.AutodiscoverUrl("username@domain.com");

The other thing is, when adding an Attendee during appointment creation, I have to again give the complete email address of a user like username@domain.com; I want to use only the username.

1

1 Answers

1
votes

When the user logs in to OWA, assuming the server is using forms based authentication, after entering username and password, upon clicking "LOG ON" the domain\user name field will be populated with the domain name ahead of the user name. You'll only see it for a second, however.

It's easier in Outlook. Go to TOOLS, ACCOUNT SETTINGS and double-click Microsoft Exchange. In the next window you'll see the FQ name of the Exchange server.