且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用aspx文件打开窗体?

更新时间:2023-12-06 15:35:28

你无法从aspx文件中有用地打开一个Windows应用程序:C#(和VB)代码运行在服务器,而不是客户端,所以用户永远无法看到它,除了在客户端和服务器是同一台机器的开发中。



你可以'从Javascript打开Windows应用程序,除非出于安全原因在极端异常的情况下。 (客户端必须使用IE,具有ActiveX控件下载权限,并且具有ActiveX运行权限 - 两者都默认为关闭.IE是大多数人仅在企业环境强制使用时使用的死鸭,并且企业环境通常有适当的策略来阻止ActiveX控件运行。)



基本上:你无法从网站上打开一个Windows应用程序。如果可以的话,勒索软件将是一个比现在更大的问题......
You can't usefully open a windows application from an aspx file: C# (and VB) code runs on the server, not the client, so the user would never be able to see it, except in development where the client and the server are the same machine.

You can't open a Windows application from Javascript either, except in extremely unusual circumstances for security reasons. (The client must be using IE, have ActiveX control download permission given, and have ActiveX run permission given - both of which default to "off". IE is a dead duck that most people only use when the corporate environment forces them to, and the corporate environment normally has policies in place to prevent ActiveX controls running.)

So basically: you can't open a windows application from a website. And if you could, ransomware would be an even bigger problem than it is now...