hi~
I made smartclient.
First, I made a StrongNamed Key(snk file).
I add my key file and set allow partiallytrustedcllers.
[assembly: AssemblyKeyFile(@"..\..\mykey.snk")]
[assembly: AllowPartiallyTrustedCallers]
I add new code group under All_Code -> Internet_Zone.
Member condition = strong named.
Strong named key value = my smartclient strong named key value.
Permission Set = FullTrust
and so, I opened my smart client page by internet explorer.
It's so good, if the control isn't against the rules of Internet_Zone
security policy.
but,
I executed Process.Start(), it raise SecurityPermissionException.
I accessed another site by WebClient, it raised WebPermissionException.
AxWebbrowser, it raised UIPermissionException or
SecurityPermissionException.
so I added that code under namespace.
[PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
so, Process.Start() or WebClient didn't raise Exception.
but AxWebbrowser still raise Exception, it related security.
and I used this code.
[PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
If I didn't set FullTrust at runtime security policy
, Assembly loading was blocked.
so I edit it to class internal member variable.
private PermissionSet permissionSet = new
PermissionSet(PermissionState.Unrestricted);
before execute Process.Start() or WebClient, I do
permissionSet.Assert();
Security Exception didn't raise.
but AxWebbrowser still raise Security Exception.
How can I run my full code by FullTrust by from smart client loading
time?
I wish to inform my customer, if they haven't full trust permission at
runtime security policy.
but it's impossible by
[PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
How do I inform it?
Please reply my question...