473,378 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Security exception -- running assembly from a shared directory

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?
Nov 15 '05 #1
1 2477
I meant to say this did NOT fix the problem.

"Fred Mellender" <no****************@frontiernet.net> wrote in message
news:ZL******************@news01.roc.ny...
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?

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Neo | last post by:
I have a usercontrol that I am trying to use as an ActiveX Control on a WebPage, however it refereneces an Assembly that whenever the first call is made to anything in the Assembly a Security...
12
by: Mark | last post by:
Hello, in a simple console application I try to create a file with some code like: FileStream file = new FileStream("test.txt", FileMode.OpenOrCreate, FileAccess.Write); StreamWriter sw = new...
3
by: E.T. Grey | last post by:
Hi, I get this everytime I try to run some code I have. I loked it up on MSDN and was informed that this had something to do with calling SystemInformation.Username property of...
1
by: Mike Logan | last post by:
Questions about Role Based Security in ASP.Net: I have a few questions about role based security in an ASP.Net application. Below are some points about our system: - We have a hierarchical...
19
by: Diego F. | last post by:
I think I'll never come across that error. It happens when running code from a DLL that tries to write to disk. I added permissions in the project folder, the wwwroot and in IIS to NETWORK_SERVICE...
6
by: Steve Long | last post by:
Help, I'm running VS.NET 2003 and when I try to start my application, I get the "unhandled exception" dialog instead of the IDE highlighting the offending line of code. The problem appears to be...
0
by: Matt | last post by:
I have an intranet asp.net application that I am hosting a windows control in. The control is referenced using the <object> tag in the html. The control interfaces with a usb i/o device on the...
1
by: jmurphy95 | last post by:
Hi there, I have a Windows application that I'm running from a shared drive that needs to access file/directory resources on other drives. I've done a lot of reading, but a lot of the material...
0
by: pratika2002 | last post by:
Hi, I am having a windows service project which is built by someone else and I have to understand the fuctionality. While running the service I am getting the following exception. "An unhandled...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.