如何使一个应用程序是否可信? [英] How to make an application trusted?

查看:113
本文介绍了如何使一个应用程序是否可信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

或者在理解如何绕过的Windows防火墙在VB.NET另一种方式?

Or in another way of understanding how to bypass the firewall of Windows in VB.NET?

推荐答案

我认为该指南通过管理code访问Windows防火墙API。这将允许你从withing程序自动打开和关闭端口,是你在找什么呢?

I found this guide to accessing the Windows Firewall API via managed code. This will allow you to open and close ports automatically from withing your program, is that what you are looking for?

<一个href="http://blogs.msdn.com/b/securitytools/archive/2009/08/21/automating-windows-firewall-settings-with-c.aspx" rel="nofollow">http://blogs.msdn.com/b/securitytools/archive/2009/08/21/automating-windows-firewall-settings-with-c.aspx

它明确给出了这样的例子,添加一个程序到受信任程序列表。

It specifically gives this example to adding a program to the trusted programs list.

INetFwAuthorizedApplications applications; 
INetFwAuthorizedApplication application;
application.Name = "Internet Explorer";/*set the name of the application */
application.ProcessImageFileName = "C:\\Program Files\\Internet Explorer\\iexplore.exe" /* set this property to the location of the executable file of the application*/
application.Enabled =  true; //enable it
/*now add this application to AuthorizedApplications collection */
Type NetFwMgrType = Type.GetTypeFromProgID("HNetCfg.FwMgr", false); 
INetFwMgr mgr = (INetFwMgr)Activator.CreateInstance(NetFwMgrType); 
applications = (INetFwAuthorizedApplications)mgr.LocalPolicy.CurrentProfile.AuthorizedApplications;
applications.Add(application);

基于注释

修改 根据意见,它看起来像你真的想看看是code签名。 http://en.wikipedia.org/wiki/$c$c_signing

Edit Based on Comments Based on comments it looks like what you really want to look at is Code Signing. http://en.wikipedia.org/wiki/Code_signing

这通常意味着购买证书(有点像SSL),并将它应用到你的编译的应用程序。这是不一样的。NET的签约也就是给予一个集强名称的一部分,这是不同的东西。

This usually means buying a certificate (kind of like SSL) and applying it to your compiled application. This is not the same as .NET's signing that is part of giving an assembly a strong name, it's something different.

这篇关于如何使一个应用程序是否可信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆