I would like to call VB6 dll with office automation from ASP.Net using the impersonated user Identity to connect to database as well as launch excel for automation.
I want to pass the NT logged-in user identity to the vb6 dll which make the connection to the database(trusted connection), as it uses NT user info for database security and also invoke excel application from vb6.
I can make it work if I set the vb6 dll as a COM+ server application and run it under a specific user identity, which do not use the impersonated user identity to connect to database, but uses the account which is set to run under as for database connection.
When I set it as a COM+ library application the identity used is NT AUTHORITY\NETWORK SERVICE and it do not have access to the database.
What we are trying to do is to reuse the excel automation code used for reporting in the current vb6 application from ASP.Net environment. So the vb6 dll code makes the trusted connection to the database and gets the data based on the parameters passed.