开发者

Dynamicly load assembly with limited rights

I am trying to gather some information on the following subject: I have developed an application that requires administrator rights. This is achieved with the following line in the manifest file:

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

Now what I would like to do is to provide a sim开发者_如何学运维ple interface for people to use and create an extension for this application. This should be provided as an assembly an will be placed in the 'Plugins' directory. The appplication will load them in dynamicly.

Obviously, I would not want those assemblies to be loaded with administrator rights.

What are the recommended ways to do this?

Thanks!


I'm not quite sure what you are trying to do, but if you want to load an assembly with limited rights, create a new application domain and assign it limited permissions by providing some low-permission level evidence, like putting it in the internet zone. Then load your assembly into this domain and it will have those low permissions.

Here's something similar to get you started.

Here's more about evidence.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜