Security exception -- running assembly from a shared directory

  • Thread starter Thread starter Fred Mellender
  • Start date Start date
F

Fred Mellender

I wish to run a C# Windows Forms program on a Windows 98SE machine, from a
directory that is owned by a Windows XP machine.

The directory is shared via directory sharing from the XP machine to the
W98SE machine via a TCP/IP network. This directory holds Foo.exe, and I
want to run the program on the W98SE machine by clicking on Foo.exe.

I *am* able to run a C# console application without problem from the shared
directory. So I presume the directory sharing across the network is fine
and the installation of the .NET runtime on the W98SE machine is also fine.

When I try to run the Forms application it comes up successfully, but when I
click on the "start" button I get a message box that says:
The Application attempted to perform an operation not allowed by the
security
policy.....

when I click on "details" from the error message box I get a stack trace
that says:

System.Security.SecurityException: Request failed.
at Foo.Test..ctor()
at Foo.FooForm.startButton_Click(...).......

This constructor does not do anything (in the C# code it has an empty body)
except to create a new Process object, via the class variable declaration:

public Process Rprocess = new Process();

so I assume it is the creation of the Process object that is failing.

I suspect I want to assign another level of trust to my assembly on the
W98SE machine (?).

I looked into the security model for dotNet and am trying to understand what
I can do to fix this problem. Under W98 I do not have access to the
security utility Mscorcfg.msc (this runs under XP, NT, W2000 but not W98, I
gather). I *can* run Caspol.exe on the W98SE machine but the only command
that seemed applicable was
-addfulltrust assembly_file
This did fix the problem.

Can you give me some advice?
 
Back
Top