Link to home
Start Free TrialLog in
Avatar of SSPIT-OPS
SSPIT-OPS

asked on

Process.Start(iexplore.exe) running from asp.net c# code

hi,
I have a web form that takes user credentials and checks against Active Direcotry and it works fine. What is required is to open new IE under this user's security context (who has just entered his credentials). In code behind of login button click event i have

ProcessStartInfo pInfo = new ProcessStartInfo();
pInfo.FileName = @"C:\Program Files\Internet Explorer\iexplore.exe";
pInfo.Arguments = "http://www.intel.com"; // also tried with -nomerge
pInfo.UserName = username;
pInfo.Password = secPassword;
pInfo.Domain = domain;
pInfo.UseShellExecute = false;
Process.Start(pInfo);

this code should open new browser under user credentials of the one who has entered his credentials on web form not the one who is already logged on to the operating system.

its like "runas" option that we get by righ clicking on IE icon.

When i run same code in Windows forms it works fine but not with asp.net - I think only one instance can be executed of Internet Explorer at one time programmatically.

i have been googling this all day and finally thought to ask you guys if anyone here knows the reason for this behaviour

any help will be great - thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of DerAndy
DerAndy
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SSPIT-OPS
SSPIT-OPS

ASKER

i guess you are right. Since ASP.NET is server side application and cant open new browser on client side. I have tried with a WinForm applciaton that takes user credentials and opens IE under his security context. The reason I want to open IE under client's given credentials is that we have 3rd party website thats running under Integrated Windows Authentication. This means I cant see my name on this website if I am on my coligue's laptop.
Anohter way is to switch this 3rd party website to Windows Basic Authentication but it will ask for the credentials and will not achieve Single Sign On.

WinForm is no go area for me as this required every client to install on their machine.
this is the precticle answer