具有从 WebService 调用的 Web 浏览器控件的 Web 自动化

发布于 2024-11-16 03:29:16 字数 194 浏览 3 评论 0原文

我正在开发一个项目,需要使用 Web 浏览器控件来模拟网站上的用户,以便他们可以填写表单并从中获取结果。

我的代码在控制台应用程序中运行,并且想从 Web 服务调用控制台应用程序。这背后的原因是潜在的请求量以及将参数传递到控制台应用程序的能力。

这听起来是否可行,这种方法是否有任何警告,例如我可以对控制台应用程序进行多少次调用的限制因素等。

I am working on a project that needs to use the Web Browser control to simulate a user on a website so they can fill out a form and get the results back from it.

I have the code working in a console app and would like to call the console app from a web service. The reason behind this is the potential volume of requests and the ability to pass parameters to the console app.

Does this sounds viable and are there any caveats to this approach such as a limiting factor to how many calls I can make to the console app, etc.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

随风而去 2024-11-23 03:29:16

Webbrowser 控件(顺便说一句,还有一些旧版本的 Windows 版 Google Chrome)使用 WinInet 作为其网络层,并且 Windows 服务不支持 WinInet,例如在 IIS 下运行。

Web浏览器控制需要STA,这不适合ASP.net。

Webbrowser 控件会加载大量 dll 文件,因此您可能需要在服务器上运行 ProcMon 来查看需要向 ASP.Net 用户授予哪些文件/文件夹权限。

Webbrowser 泄漏很多,它在服务器上不能很好地扩展。

我记得看到人们从 IE 的网络浏览器控件迁移到 GeckoFX,然后迁移到 WebKit.Net for Windows 服务,但我还没有收到任何迁移到 WebKit 的人的回复。我不知道是否有人尝试过使用 CefSharp 在 Windows 服务中运行 Chromium,但是值得一试,Chromium 前段时间切换到了自己的网络堆栈。

Webbrowser control (and some old versions of Google Chrome for Windows, by the way) uses WinInet as its networking layer, and WinInet is not supported in Windows Services, such running under IIS.

Webbrowser control requires STA, which is not suitable for ASP.net.

Webbrowser control loads a lot of dll files, so you may need to run ProcMon on the server to see which file/folder you need to give permission to the ASP.Net user.

Webbrowser leaks a lot, it does not scale well on servers.

I remember seeing people moved from the webbrowser control from IE to GeckoFX, then to WebKit.Net for Windows service, but I have not heard back from anyone moving to WebKit. I don't know if anyone tried using CefSharp to run Chromium in Windows Services, but it is worth a try, Chromium switched to its own network stack a while ago.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文