Hello,I'm trying to use chromedriver, let's consider the following piece of C# code:
//--------- MY CODE -----------------------------------------------------------------
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.AddArgument("disable-infobars");
chromeOptions.AddArgument("--no-sandbox");
//other option here... but NO headless mode
ChromeDriver driver = new ChromeDriver(path, chromeOptions);
driver.Navigate().GoToUrl(<some url>);
//--------------------------------------------------------------------------------------------
The scenario are the following:
- if I put MY CODE in my local app console on WIN10 all work fine;
- if I publish that app console on a windows server 2012 R2 and I manually launch it all work fine;
- if I publish that app console on a windows server 2016 and I manually launch it all work fine.
- if I put MY CODE in a .NET framework 4.8 webapi controller and launch it on my local pc with WIN10 all work fine;
- if I publish that webapi in IIS on a windows server 2012 R2 and I test it, chrome works in background and it's no visible;
- if I publish that webapi in IIS on a windows server 2016 and I test it, chrome works in background and it's no visible;
- if I put MY CODE in a .NET 6.0 webapi controller and launch on my local pc with WIN10 all work fine;
- if I publish that webapi in IIS on a windows server 2012 R2 and I test it, chrome works in background and it's no visible;
- if I publish that webapi in IIS on a windows server 2016 and I test it, chrome works in background and it's no visible;
- if I create an app console containing MY CODE and I run the exe in a webapi controller (i.e. with a process.start(..) on my local pc with WIN10 all work fine;
- if I publish that webapi in IIS on a windows server 2012 R2 and I test it, chrome works in background and it's no visible;
- if I publish that webapi in IIS on a windows server 2016 and I test it, chrome works in background and it's no visible;
When I say "all work fine" I mean I can see chrome running and visible.
I need to see chrome running visible in windows server: someone could tell me what's the reason of different behaviour between windows server and not server version?
And how could I resolve?
Thanks in advance, best regards.
M.