简体   繁体   中英

Programmatically provide Credentials when opening Web-Browser (for CRM Login)

I have an C# WPF Application that opens a specific Contact or other site in CRM 2011 on certain events or button clicks. As I cannot always use the Windows credentials to login in the Webbrowser (because users can also access the Network from outside with other accounts using IFD), the user has to provide his credentials everytime he as soon as he closed all browser Windows. This is very annoying after several times

I tried using the ProcessStartInfo class

ProcessStartInfo proc = new...
proc.UserName = credentials.UserName;
proc.Password= credentials.Password;
Process.Start(proc);

etc. but this only throws an exception about invalid data... Next thing I tried is to put the logindata in the URL like user:pass@crmsite but this doesn't work either (Also I would prefer not to use this method if possible). I even tried to inject a cookie with the logindata to IE but I was not very successful.

Is there a way to programmatically provide credentials to the browser so that you are automatically logged in to CRM?

Update : Increasing Session timeout or something like that will not work because we are using IFD for CRM. There is no automatic Login with Windows Credentials.

The user should not even have to type his credentials in the first place. All data should be provided from my Application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM