13
votes

We had a bit of a snafu on our e-mail server and the permissions went out of whack on our users e-mail folders.

Unfortunately our users are all on Outlook Web Access and do not have access to change the permissions on their e-mail folders.

What I've been tasked with is to expose the ability to change the permissions on exchange e-mail folders. My plan is to somehow interface with Exchange and put the relevant information in an ASP.Net webpage.

I see that there is an Exchange Web Services dll however I'm not sure if that is enabled on our installation. Is there another way to communicate with Exchange? Preferably using C#? Is it easy to turn on Web Services if it is off? How can I check if it is on?

Regards,

Edit : I tried connecting through EWS however I'm getting Error 102 (net::ERR_CONNECTION_REFUSED): Unknown error. This may be because I do not have permissions or the service isn't turned on. I'm going to look into that. Thanks for the suggestions.

Ok, it looks like I had the wrong URI. I'm now getting an "Exchange Server doesn't support the requested version." (I'm just trying to send a test e-mail)

1
Typically EWS is here: mailserver/EWS/exchange.asmxSean
In response to your edit about wrong version, if you look at the sample I linked to in my answer it has a bit ExchangeVersionType.Exchange2010 which you might need to change depending on which version of Exchange you're using. This technet discussion might be useful: social.technet.microsoft.com/Forums/en-US/…Hans Olsson
@ho1 Awesome, looks like we are on Exchange2007_SP1 thanks for your help ho1!Biff MaGriff

1 Answers

9
votes

The best way to check if it's up an running and everything working fine would probably be to create a simple sample app as described here: Creating an Exchange Web Services Client Application

As far as I know, this is the best way of accessing Exchange from C#. I think the old way was CDO but that's not supported by Microsoft for .Net I think.