hi~
I made smartclient.
First, I made a StrongNamed Key(snk file).
I add my key file and set allow partiallytruste dcllers.
[assembly: AssemblyKeyFile (@"..\..\mykey. snk")]
[assembly: AllowPartiallyT rustedCallers]
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 SecurityPermiss ionException.
I accessed another site by WebClient, it raised WebPermissionEx ception.
AxWebbrowser, it raised UIPermissionExc eption or
SecurityPermiss ionException.
so I added that code under namespace.
[PermissionSet(S ecurityAction.A ssert, 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(S ecurityAction.A ssert, 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(P ermissionState. Unrestricted);
before execute Process.Start() or WebClient, I do
permissionSet.A ssert();
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(S ecurityAction.A ssert, Name = "FullTrust" )]
How do I inform it?
Please reply my question...