I am using winows authentication to connect to a web page and user.identity and principle.windowsidentity are showing as my currently logged in active directory user. I can successfully connect to SQL Server with a integrated security connection string at this point.
I then prompt the user for login as a different account on the domain and change the principle.windowsidentity to this login using
<DllImport(
"advapi32.dll", SetLastError:=True)> Private Shared Function LogonUser(ByVal lpszUsername As String