IIS 8工作进程屏幕大小限制为1024X768

时间:2021-08-21 19:14:29

I have a web application running under a .NET v4.0 integrated pipeline 64-bit application pool in IIS 8. My web application needs to take a screenshot (using Selenium / Chromedrive).

我有一个web应用程序在。net v4.0中运行,它集成了IIS 8中的64位管道应用程序池。我的web应用程序需要截图(使用Selenium / Chromedrive)。

The problem I'm running into is that the image is generated by another application (dynamically), called by my web application and started as a child process under the IIS worker process.

我遇到的问题是映像是由另一个应用程序(动态地)生成的,这个应用程序由我的web应用程序调用,并在IIS worker进程下作为子进程启动。

As it happens, this application needs to create a window (i.e., GUI window) as large as the image before it can take a snap shot of it and send the image data back to the web application. This GUI window is created on the server machine, although invisible.

碰巧,这个应用程序需要创建一个窗口(例如。它可以对图像进行快照,并将图像数据发送回web应用程序。这个GUI窗口是在服务器机器上创建的,虽然不可见。

Now, normally this application works fine running by itself, as I have a large wide-screen monitor with 1920x1200 limit. So the OS maximum window size limit does not factor in. However, when the application is running under the IIS 8 worker process, it seems the worker process places an arbitrary 1024x768 resolution limit on any applications running within it (despite the fact that I have my large monitor attached to the same machine).

现在,这个应用程序本身正常运行,因为我有一个1920x1200限制的大屏幕监视器。所以操作系统的最大窗口大小限制没有考虑进去。然而,当应用程序在IIS 8 worker进程下运行时,worker进程似乎会对其内运行的任何应用程序设置任意的1024x768分辨率限制(尽管我的大监视器附加在同一台机器上)。

So now the application can only create a window of 1024x768 size, and then the resulting snapshot comes out with this size. And i need to take a screenshot in 1920x1200

因此,现在应用程序只能创建一个大小为1024x768的窗口,然后生成的快照将显示这个大小。我需要在1920x1200拍一个截屏

I suppose that due to the IIS worker process isolation going on, any applications under it cannot see the full resolution capabilities of the server and only works with what IIS gives it.

我认为,由于IIS worker进程隔离正在进行,它下面的任何应用程序都无法看到服务器的完整解析能力,只能使用IIS提供的功能。

Is there any way I can remove this restriction so that applications running under the IIS worker process can create windows larger than 1024x768?

有什么方法可以删除这个限制,以便在IIS worker进程下运行的应用程序可以创建大于1024x768的窗口?

Thanks!

谢谢!

1 个解决方案

#1


2  

After long research there is NO WAY to do that... i ended by using a docker container with SELENIUM to do the screenshots in resolution greater than 1024x768

经过长时间的研究,这是不可能的。最后,我使用一个docker容器和SELENIUM执行大于1024x768的屏幕截图

Bonus, it's a lot more stable than doing it through a sub process started by IIS

额外的好处是,它比通过IIS启动子进程更稳定。

https://hub.docker.com/r/selenium/node-chrome/

https://hub.docker.com/r/selenium/node-chrome/

#1


2  

After long research there is NO WAY to do that... i ended by using a docker container with SELENIUM to do the screenshots in resolution greater than 1024x768

经过长时间的研究,这是不可能的。最后,我使用一个docker容器和SELENIUM执行大于1024x768的屏幕截图

Bonus, it's a lot more stable than doing it through a sub process started by IIS

额外的好处是,它比通过IIS启动子进程更稳定。

https://hub.docker.com/r/selenium/node-chrome/

https://hub.docker.com/r/selenium/node-chrome/