hi,
I'm trying to run an assembly in internet explorer (local mode - smart
client architecture).
I need to secure the running, so the first step is protecting the URL.
In .net framework 2.0 configuration I go to ->runtime security policy -
> Machine -> Code Groups I adding new code group.
In the security permissions the Assert is Yes, and the membership
condition is URL with http://127.0.0.1/* , and then the following code
is working:
WebPermission webPerm = new
WebPermission(PermissionState.Unrestricted);
webPerm.Demand();
The second step is protecting it more with the Strong name of the
assembly.
In .net framework 2.0 configuration I go to ->runtime security policy -
> Machine -> new Code Groups, and the membership condition is Strong
Name with the public key of the assembly. The following code is
failed:
WebPermission webPerm = new
WebPermission(PermissionState.Unrestricted);
webPerm.Demand();
this code is also failing:
WebPermission webPerm = new
WebPermission(PermissionState.Unrestricted);
webPerm.Assert(); // bypass the AppDomain level in stackwalk
webPerm.Demand();
what I need to do for solving this problem?
Thank you,
Dov
dave - 26 Nov 2007 15:13 GMT
ok, I made a mystake,
there is no point to call demand after assert, the assert "pass" the
application about the specific permission set.
If I want to add another permission sets like SocketPermission, I have
problem because you can do assert only to one permission set.
If I'm doing RevertAssert its not good also,
so maybe anyone know how to assert more than one permission set ???
Thanks
Dominick Baier - 26 Nov 2007 15:46 GMT
create a PermissionSet and add all the needed permissions to it.
PermissionSet ps = new PermissionSet();
ps.AddPermission (...);
the call Assert on the set
ps.Assert();
-----
Dominick Baier (http://www.leastprivilege.com)
Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp)
> ok, I made a mystake,
> there is no point to call demand after assert, the assert "pass" the
[quoted text clipped - 4 lines]
> so maybe anyone know how to assert more than one permission set ???
> Thanks
dave - 27 Nov 2007 08:38 GMT
James Matthews - 30 Nov 2007 12:21 GMT
are you using internet explorer 7?

Signature
http://search.goldwatches.com/?Search=Movado+Watches
http://www.goldwatches.com/
http://www.jewelerslounge.com/
> hi,
> I'm trying to run an assembly in internet explorer (local mode - smart
[quoted text clipped - 29 lines]
> Thank you,
> Dov