你如何部署,即从VS2008项目一个ActiveX控件? [英] How do you deploy an ActiveX control for ie from a VS2008 project?

查看:193
本文介绍了你如何部署,即从VS2008项目一个ActiveX控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪些步骤来部署在VS2008(Windows窗体和C#),如即主办的ActiveX控件创建的项目?我有我想要的,用户可以浏览,点击的网页被托管的文件上传项目的信任此Active X控件'和应用程序在浏览器页面上运行,就像一个Java应用程序。

What are the steps to deploying a project created in VS2008 (windows forms and c#) as a ActiveX control hosted in ie? I have a file uploader project that I want to be hosted on a webpage that users can navigate to, click 'trust this active x control' and the application runs on the page in the browser, just like a java application.

要清楚,我不是在寻找的ClickOnce(这是一个安装程序),我不希望用户必须修改他们的.NET安全或添加受信任的站点(所以只是把.dll文件在OBJECT标签不工作)。我需要一些数字签名证书的一些东西?我发现这个引用但没有一步一步的指导,它(如我的Java)。

To be clear, I'm not looking for ClickOnce (that is an installer) and I don't want the user to have to modify their .Net security or add a trusted site (so just putting the .dll file in a OBJECT tag doesn't work). Do I need some digital signature, some certificate something? I've found references to this but no step-by-step guide to it (like I got for java).

有什么建议?这似乎是这将会是该项目的最容易的部分,但它的转向了是迄今为止最难的,我不能对任何进展。

Any suggestions? This seemed like it'd be the easiest part of the project but its turning out to be by far the hardest, I can't make any headway on it.

谢谢,
山姆

推荐答案

和的回答是,可悲的是,.NETActiveX控件不像COM ActiveX控件(VB6),即使你让.NET控件COM可见你不能在操作系统中注册相同的方式。你要做的是什么:

And the answer is, sadly, that .net "activeX controls" aren't like COM activeX controls (VB6), even if you make the .net control com-visible you can't register it with the OS the same way. What you have to do is:

1)创建您的.NET的DLL文件
2)创建一个安装程序exe文件(我使用InstallShield做到了,看起来也可以在VS完成)
3)包的安装到一个CAB文件
4)点在IE中的CAB文件。

1) Create your .net dll file 2) Create an installer exe (I did it with InstallShield, looks like it can also be done in VS) 3) Package that installer into a cab file 4) Point to that cab file in IE.

什么这导致在IE中的小'的activeX确认降下来,那么你信任这个程序来了,那么UAC(VISTA / W7)和然后的你通过正常运行应用程序安装过程:安装程序窗口出现,确认,挑安装目录。这就是完成后,将出现在IE浏览器在页面上你的控制。

What this results in is in IE the little 'activeX' confirm drops down, then the 'do you trust this app' comes up, then UAC (vista/w7) and then you get to run through the normal application install process: installer window comes up, confirm, pick install dir. After thats done, your control appears on the page in IE.

它使用COM工作是,一旦你做了小的ActiveX确认下拉(和UAC)的方式该应用程序会运行

The way it used to work in COM was once you did the little activeX confirm drop down (and UAC) the app would just run

现在,以上只是如果你需要/希望它是.NET 2.0兼容。如果你不介意不仅是与3.0或更高版本兼容,你可以做一个XBAP应用程序:

Now, the above is only if you need/want it to be .Net 2.0 compatible. If you don't mind only being compatible with 3.0 or higher you can do an XBAP application:

http://stackoverflow.com/questions/1309451/what-is-microsofts-roadmap-for-in-browser-applications -silverlight-的ClickOnce

和你甚至可以只取你的.NET的DLL你度过了过去的3周学习如何使(弗里克),并将其塞进WPF应用程序:

And you can even just take your .Net dll you spent the last 3 weeks learning how to make (frick) and jam it into the WPF application:

http://stackoverflow.com/questions/1310154/how-to-put-a-custom-windows-forms-control-in-a-wpf-application

希望这可以帮助别人。
山姆

Hope this helps others. Sam

这篇关于你如何部署,即从VS2008项目一个ActiveX控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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