> This doesn't happen on XP/2000. Any ideas!
Thanks you very much for the reply!
>>Ok! I have a .NET (C#) app that I'm having a problem running on a Win 2003
>>box from a different Win 2003 box. I mean files physically are installed
[quoted text clipped - 4 lines]
> from its ToString method would be best, but anything might help narrow
> things down a bit.)
Here is the exception dump:
System. Security. Policy Exception: Required permissions cannot be acquired.
at TMSubDock.Form1.InitializeComponent
at TMSubDock.Form1..ctor
at TMSubDock.Form1.Main (String[] arg)
>>I know about that .NET framework wizard that allows you to adjust .NET
>>level of protection to internet/intranet/trusted and so on but that
>>doesn't help.
>
> On which machine did you attempt to run the wizard? Are you sure you were
> granting sufficient permissions for the application to run?
Only on the Win2003 where I'm trying to run the thing. The second
Win2003 (file server) doesn't even have the framework installed at all.
Checked all the permissions!
>>This doesn't happen on XP/2000. Any ideas!
>
> I'm guessing that the other machines on which you've tested this have
> perhaps had some CAS policy modifications applied, possibly via a group
> policy object distributed via the domain. You might want to ask the
> relevant network admin(s) about this possibility.
It actually sounds more like specific Win2003 issue due to stronger
security on it, may be. Hopefuly that is setable.
>>Thanks a lot in advance!
>>Please help! It's very urgent!
Nicole Calinoiu - 30 Aug 2005 19:13 GMT
<snip>
> Here is the exception dump:
> System. Security. Policy Exception: Required permissions cannot be
> acquired.
> at TMSubDock.Form1.InitializeComponent
> at TMSubDock.Form1..ctor
> at TMSubDock.Form1.Main (String[] arg)
A PolicyException usually results from one of the two following
circumstances:
1. An assembly is denied SecurityPermission\Execution permission under
policy, or
2. An assembly has one or more RequestMinimum permission attributes, but
CAS policy denies the permission(s) specified by these attribute(s).
Since the exception is thrown from the assembly that contains
TMSubDock.Form1, this is not the assembly that is being denied minimum
permissions under policy. Instead, you should be looking at the permission
grants to assemblies that might first be loaded in the
TMSubDock.Form1.InitializeComponent method.
>> On which machine did you attempt to run the wizard? Are you sure you
>> were granting sufficient permissions for the application to run?
>
> Only on the Win2003 where I'm trying to run the thing. The second Win2003
> (file server) doesn't even have the framework installed at all.
> Checked all the permissions!
The assembly that's causing the problem may not even be an assembly that you
authored. In fact, it might not even be in your network deployment
location. What happens if you copy the application to the Windows 2003
machine on which it is supposed to run? Does it run successfully, or do you
still see an exception? If there's an exception thrown, is it the same
exception?
> It actually sounds more like specific Win2003 issue due to stronger
> security on it, may be. Hopefuly that is setable.
While there are some very small differences between .NET Framework behaviour
on Windows 2003 vs. other Windows versions, I know of no differences in
default CAS policy configuration. However, regardless of the reason for the
difference in policy (if this is the reason for the failure in the first
place), you'll need to figure out what permissions are missing from which
assemblies before you can adjust the policy to fix the problem...