Windows Form Control Hosted in IE - Access to Workstation Resources?

J

Joseph Geretz

I understand that the default access restrictions will not allow a Form
Control hosted within IE to access workstation resources (i.e. Filesystem,
Printers, etc.). Naturally, this makes sense.

However, is there any way to alter permission settings to allow this? We are
contemplating this sort of engineering for its unique combination of
deployment advantages, coupled with the ability to engineer a rich Win32
interface. We also like the browser embedded model since this will interface
nicely with other areas of our application which host an embedded browser.
The only limitaiton we need to overcome is the ability for our own code,
loaded from our own application server, and running within the browser, to
be able to access the filesystem (and other resources) of the local
workstation upon which it will be running.

If I recall correctly, this was possible with ActiveX documents running
inside a browser (subject to permisisons of course). Will this be possible
with the .NET form control hosted within the browser? If so, what needs to
be configured on the workstation in order to allow this?

Thanks for your advice!

- Joseph Geretz -
 
J

Joseph Geretz

Thanks Joe,

I used the info in this page:

http://msdn.microsoft.com/msdnmag/issues/02/01/UserCtrl/

Basically, I gave http://localhost/* full trust.

I don't know why the author states that the following statements are
necessary to bracket code statements which take advantage of grnated
permissions.

new FileIOPermission(PermissionState.Unrestricted).Assert();
....
CodeAccessPermission.RevertAssert();

I have found that these are not necessary. (I note that the article is from
2002.)

Thanks,

- Joe Geretz -
 
J

Joseph Geretz

Follow up:

Now that this is working properly, how do I make that one last modification
so that the user doesn't need to explicitly click or hit spacebar or Enter
in order to explicitly activate the control? Can this be loaded in a 'ready'
state so the user can go right to work with this?

Thanks!

- Joseph Geretz -
 
J

Joe Kaplan

I think it depends on the way you configure the membership conditions. If
you use a strong name membership condition, then you'll need to assert
permissions as the app domain that IE itself loads the control in won't have
that particular condition apply to it. With the URL membership condition,
it will. You typically don't want to use extremely broad-based membership
conditions if you can avoid it as they open up security risks.

I can't answer your other question about having to hit the space bar. I
think that is a feature. :)

Joe K.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top