I am building an application in which I allow users to import data from one table into another on the fly. The user enters the details for the connection and select statement. I then build the connection string and grab the data. The problem is that I don't want to give the useraccount on the webapplication pool read access to every database on the server. I need to be able to allow the user to enter their AD credentials and then temporarily impoersonate those to connect to and get the data to be imported.
We don't like to use SQL username and password, so authentication is usually controlled by Active Directory accounts and we run our webapp pool as a domain user. I know how to connect using a SQL username and pwd, just not how to send domain credentials to connect. I am using Forms authentication not windows so it's also not possible to impersonate the current logged on user, I need to allow them to enter their domain credentials.
...
Go to the complete details ...