Re: Accessing Exchange mailbox from WinForm

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello Jay,

Dan already answered the first question.

As with your second question:

You can simply use request.Crededentials =
CredentialCache.DefaultCredentials.

this will use integrated authentication.

Greetings,
Henning Krause


"Jay Williams" <JayWilliams@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A36675FA-E7BA-46F6-832F-5984FEB731F9@xxxxxxxxxxxxxxxx
Thanks for your response.

I have a few questions, however:

1) Why does Outlook use MAPI and why shouldn't I?
2) I see, in the sample code you directed me to that they'r doing the
following (with WebDAV):

MyCredentialCache.Add(new System.Uri(strRootURI), "NTLM",
new System.Net.NetworkCredential(strUserName, strPassword, strDomain));

Is there a way I can simply pass along the Credentials via the Windows
Principal or Windows Identity so that I don't have to type in a username
and
password? If not, what's the point of Windows Authentication?

I want anyone on our network to be able to fire up this app and see their
own Inbox (for example) without having to type anything in. After all,
they're already Authenticated by Windows. Why should I have to have them
type
anything else it?

Thanks a ton!
Jay


"Henning Krause [MVP]" wrote:

Hello,

Outlook uses MAPI.. and from C# you don't want to use this :-) Actually,
it's not even supported.

One method you can use is WebDAV. You can find some examples here:
http://msdn.microsoft.com/library/en-us/e2k3/e2k3/_esdk_key_tasks.asp and
the reference here:
http://msdn.microsoft.com/library/en-us/e2k3/e2k3/_webdav_web_store_http_webdav_protocol_reference.asp

All communications are done with the HttpRequest Class, which supports
Windows Authentication.

Greetings,
Henning Krause

"Jay Williams" <JayWilliams@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1E5B3E0C-502C-4EA1-9FD9-D9A440F31F8D@xxxxxxxxxxxxxxxx
Can someone give me some C# sample code for retrieving mail from an
Exchange
folder (such as "Inbox" or "Sent Items") using Windows Authentication
from
a
WinForm app? Or, just point me to a website that has a sample.

How does Outlook do all of its stuff? I suspect this is how I would
want
to
do it.

Thanks,
Jay





.



Relevant Pages

  • Re: questions on setting up a mail server
    ... authentication types in kmail to get an idea of what I can use, ... but with Windows 2000/XP and Outlook 2003, it's not magic. ... Perhaps true in a small network. ...
    (freebsd-questions)
  • Re: Change in ASP.Net authentication between Win2000 and Win2003
    ... > is turning on/off Kerberos is occuring. ... It control how IE deals with "Authentication: ... when you put IIS6 in a domain and have "Integrated Windows Authentication" ...
    (microsoft.public.windows.server.security)
  • Re: Change in ASP.Net authentication between Win2000 and Win2003
    ... > is turning on/off Kerberos is occuring. ... It control how IE deals with "Authentication: ... when you put IIS6 in a domain and have "Integrated Windows Authentication" ...
    (microsoft.public.inetserver.iis.security)
  • Re: Need help configuring Wireless Connection profile
    ... and I can only use the intel OR windows utility, not both at the same time. ... Windows authentication for all users,4129,LRG\ryanv,4149,Wireless WPA2 ... SMALL BUSINESS SERVER: ... STEP #1 Install Certificate Services ...
    (microsoft.public.windowsxp.general)
  • Re: form authentication and webservices
    ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... We will be using Windows Authentication on the Web Services side (same ... Dominick Baier ...
    (microsoft.public.dotnet.framework.aspnet.security)