签署activex控件和授予权限的正确方法是什么 [英] What the right way to sign activex control and grant permission

查看:213
本文介绍了签署activex控件和授予权限的正确方法是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有IE的activex C#控件。从一些主机下载的contol。 Control执行一些需要特殊权限的工作(IE显示窗口,其中包含我的控件无法在未经许可的情况下进行操作的信息)。我花了很多时间谷歌搜索和阅读有关类似情况的许多主题。我明白我必须遵循以下事项:

1.用强键签署控制组件。

2.授予组装许可。

I用VS2010工具生成强大的密钥。之后我的控件停止在页面上显示(如果不使用签名控件显示是正常的)。我知道gacutil / cdl,它没有帮助。
我决定在获得许可后,控制显示就可以了,但我的意见是错误的。我通过命令 caspol -addgroup 1 -ur http:// myhostname / myAdditionPathToControlAssembly /授予汇编权限control.dll FullTrust (关于caspol实用程序描述 http://msdn.microsoft.com/en-us/library/cb6t8dtz(v = vs.80).aspx )。
毕竟我的控件没有显示。


签署activex控件并授予权限以解决我的问题的正确方法是什么?

I have activex C# control for IE. That contol downloaded from some host. Control does some work that needs special permissions(IE shows window with information that my control cannot do operation without permission). I spend a lot of time googling and reading many topics about similiar situations. I understood that I must do following things:
1. Sign control assembly with strong key.
2. Grant permission to assembly.
I generated strong key with VS2010 tools. After that my control stopped displaying on page(if don't use signing control displaying is normal). I know about gacutil /cdl, it doesn't help. I decided that after granting permission, control displaying will be OK, but my opinion was wrong. I granted permission for assembly via command caspol -addgroup 1 -url http://myhostname/myAdditionPathToControlAssembly/control.dll FullTrust (about caspol utility describes http://msdn.microsoft.com/en-us/library/cb6t8dtz(v=vs.80).aspx). After all my control does not displaying.
What the right way to sign activex control and grant permission to solve my problems?

推荐答案

Internet Explorer可能阻止您初始化控件。您需要将控件标记为安全脚本安全初始化。此文档描述了。这至少会让你开始。如果您有更详细的问题,请大家知道。

Internet Explorer is probably preventing you from initializing your control. You'll need to mark the control as Safe for Scripting and Safe for Initialization. This document describes how. That will at least get you started. If you have further, more detailed questions, let us all know.

这篇关于签署activex控件和授予权限的正确方法是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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