开发者

Silverlight and Full Trust Issue

开发者 https://www.devze.com 2022-12-13 06:52 出处:网络
We are planning to build a new integration component that can provide us access to user\'s machine installed apps from our web site.

We are planning to build a new integration component that can provide us access to user's machine installed apps from our web site.

The first word that came to me was ActiveX, but our expertise with the technology was not the best in the past.

Thinkink a lit bit more, the wo开发者_StackOverflowrk Silverlight also came to my head, but the full trust thing was one of the few things I remembered reading about the technology..

The question is: is there a way that Silverlight (2, 3, 4, whatever) can run as a full trusted application from within the browser?

Links are appreciated.

Filipe


Unfortunately, no. Full trust is a feature of Silverlight 4, currently in beta, and is restricted to out-of-browser applications.

Additionally, full trust SL4 applications do not have unrestricted access to the system (particularly file system), though this may change before before release (if I have anything to do with it).

Edit: If you are considering ActiveX (which is Windows/IE only), you might want to have a look at WPF, since it can run full trust from the browser (if it's in a trusted zone).


No, like Richard said, this is not at all possible inside the browser, even in SL4. There is a sandbox, and you live in it. You can talk to web services, other Silverlight applications or the browser.

By talking to the browser, I mean you can talk to the DOM and the Javascript engine. We needed to launch a Windows application and communicate to it via Silverlight. We accomplished this by putting a small ActiveX control in the web page. It is responsible for launching the WinForms application and handling inter-process communication to it.

This method has many drawbacks: It can only work in IE, and it only works in Windows. You might also run into permissions issues. The ActiveX component needs to be installed along with the desktop application, or as an additional download. The deployment story there is pretty awful, if you ask me.

In our case, the analysts were willing to deal with the restrictions for the re-usability of an existing application, and we consider it to be an optional feature.


Does it have to be a web application? sounds like you want a desktop app. It can be easiliy distributed with one Click deployment. Will work on windows only but since you were considering ActiveX sounds like that's what you need.


Well - if you're hosting the silverlight control from an ASP.NET application - Believe you have access to

Request.ServerVariables["AUTH_USER"];

...and you can pass that on to your control as a parameter.

D

0

精彩评论

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