views:

38

answers:

1

I m developing ASP.Net project in company. Every user has an unique exchange account.

Im trying to authenticate the user based on teh user's Exchange credentials for web project. I want to use exchange server account for each user.

I just dont want to add users to database, because they already have userid and password in exchange server.

For example;

User id: user_email

pass: users email password

How can I use this data in my c#.net project?

Thanks.

A: 

Unless you have an unusual situation with your exchange setup, and assuming the web server is a member of the same AD domain, then all you have to do is set the web application to use windows authentication.

This is usually pretty straight forward, and just requires that you set the right mode in web.config.

<system.web>
...
    <authentication mode="Windows"/>

That will get your users get authenticated against AD.

For a more advanced and complete description of various windows authentication configurations see this MSDN article

Stephen M. Redd
Thanks Stephen. But Users login their account name and password. I m looking for exchange account. Because there are email adresses and password on Exchange.
Jack
Jack, unless you've done something highly unusual with your exchange implementation, then exchange uses active directory to authentication users. That's where the user accounts live. So when your exchange users login to exchange, they are Authenticating with the windows domain. Using windows authentication in the web server would be the same thing. If your exchange setup is not using AD or your web server isn't part of the same domain or something, we'd need to know in what ways your environment differs from the norm in order to answer your question.
Stephen M. Redd