Quote Originally Posted by gep13 View Post
Hey,

Just to confirm, the SSO that you are referring to, do you mean Single Sign On.

If so, the connection to the database would be simply what is listed here:

http://www.connectionstrings.com/sql-server

Use a trusted connection, and then use ASP.Net Impersonation to pass the credentials of the current user through to ASP.Net:

http://msdn.microsoft.com/en-us/libr...18(VS.71).aspx

As for the Mail Server, the same technique can be used.

Gary


Yes .. By SSO I am referring to Single Sign On.


One thing here is that I want to pass the credentials dynamically. I dont want the identity credentials for impersonation in Web.Config because this will be for one user only.

I want to do it like each user when he logs on to my application should get access to database and the mail server.

I am trying to do this because when we take a login history of the database it should show how many users and who are all teh users that are logged in.

Also for sending mails I want to use the credentials of the logged in user, sinc ethe from ID should be from the specific users who are actually sending out mails.

I have browsed some more on the web and found this link for impersonation, but even though it is changing the Environment.UserName, it still seems to work under the main identity, because I tried running this code by removing permissions to one user name and trying to impersonate that user, still the application is able to access the resource.