简体   繁体   English

如何在VB.NET中与浏览器进行交互

[英]How to interact with browser in VB.NET

I have three website links: 我有三个网站链接:

link1.domain.com link1.domain.com

link2.domain.com link2.domain.com

link3.domain.com link3.domain.com

And Three VB.NET Applications: 和三个VB.NET应用程序:

App1 for link1.domain.com 适用于link1.domain.com的 App1

App2 for link2.domain.com 适用于link2.domain.com的 App2

App3 for link3.domain.com 适用link3.domain.com的App3

I want something like whenever I run App1 ONLY link1.domain.com will be available to access, and link2 & link3 will be hidden and not accessable and so on... 我想是这样,每当我运行应用1 只link1.domain.com将可以访问,并链接2&LINK3将被隐藏和不可访问,等等...

I also want my website unreachable when someone tries to access it without the app. 当有人尝试不使用该应用程序访问我的网站时,我也希望无法访问我的网站。

Is that possible? 那可能吗?

Use a webbrowser control inside each application. 在每个应用程序内部使用一个Web浏览器控件。 The following link shows how to restrict urls in the webbrowser. 以下链接显示了如何限制Web浏览器中的URL。

How can I prevent a user from browsing to certain web sites in a WebBrowser control? 如何防止用户浏览WebBrowser控件中的某些网站?

For the 'must use app' restriction you can do this by making your app automatically login to the website that it has permission for and denying all anonymous users. 对于“必须使用的应用程序”限制,您可以通过使应用程序自动登录到其具有权限的网站并拒绝所有匿名用户来实现。

Example of auto login is here: C# - Automatic Login to a webpage using WebBrowser - disabled html tag 自动登录的示例在这里: C#-使用WebBrowser自动登录到网页-禁用html标签

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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