473,406 Members | 2,467 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,406 software developers and data experts.

SecurityAccess problem with .Net2.0 and COM

Hi out there,

I get a SecurityPermission Exception when trying the following:

My local executable calls an Assembly (let's call it Remote.dll) that
resides on a mapped network drive. This assembly in turn calls a local
Assembly ("Local.dll"), which calls some unmanaged code (a COM Dll).
(Yes, this is somewhat complicated, but cannnot be changed for various
reasons).

When "Local.dll" tries to access the COM dll, I get a
SecurityPermission Exception. I tried to set the
"AllowPartiallyTrustedCallers" Attribute in the Local DLL, without
success.

When I move "Remote.dll" to my local system, everything works fine,
but that is not what we want. Also, when I change the .Net permissions
for the "Local Intranet" via the "Administrative Tools" to "Full
trust", it works fine, but again, this is not a solution for us, as
our final customers cannot do this (they haven't got VS Tools
installed). So I am looking for a solution within my code itself.

Anybody out there who can help me out?

I am working with .Net 2.0 SP1 on a Windows XP.
Jun 27 '08 #1
1 894
On 27 Jun., 17:25, qglyirnyf...@mailinator.com wrote:
Hi Michael,

Long shot here, but what would happen if you decorate the method that
is giving you the error with the attribute below? This should go on a
method on the "Local.dll" assembly.

[System.Security.Permissions.PermissionSet(System.S ecurity.Permissions.SecurityAction.Assert,
Name = "FullTrust")]

Thanks.

On Jun 27, 7:23 am, Michael.Dresc...@odt-oce.com wrote:
Hi out there,
I get aSecurityPermissionException when trying the following:
My local executable calls an Assembly (let's call it Remote.dll) that
resides on a mapped network drive. This assembly in turn calls a local
Assembly ("Local.dll"), which calls some unmanaged code (a COM Dll).
(Yes, this is somewhat complicated, but cannnot be changed for various
reasons).
When "Local.dll" tries to access the COM dll, I get a
SecurityPermissionException. I tried to set the
"AllowPartiallyTrustedCallers" Attribute in the Local DLL, without
success.
When I move "Remote.dll" to my local system, everything works fine,
but that is not what we want. Also, when I change the .Net permissions
for the "Local Intranet" via the "Administrative Tools" to "Full
trust", it works fine, but again, this is not a solution for us, as
our final customers cannot do this (they haven't got VS Tools
installed). So I am looking for a solution within my code itself.
Anybody out there who can help me out?
I am working with .Net 2.0 SP1 on a Windows XP.


Hi,

thanks a lot, it works perfect, this is what I was looking for!!!
Jun 30 '08 #2

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

Similar topics

5
by: Scott H | last post by:
I spent most of yesterday looking into this, and still didn't really find an answer... I have a .NET2.0 app that I need to install on a server, and then possibly several other servers later, it...
2
by: Patrick Smacchia | last post by:
Hi, I've just released the book Practical .NET2 and C#2. More info is available on the site http://www.PracticalDOT.NET You can download sample chapters about CLR, Security, Threading/Synchro...
0
by: Filippo Bettinaglio | last post by:
PermView.exe - .NET Framework Permission Request Viewer. Why PermView.exe is not included any more in the .NET2 Framework? Is there a correspondent utility for .net2 assemblies? Many Thanks,...
0
by: Groove | last post by:
I've noticed something that's come up twice today alone. In ASP.NET 1, I could reference and use a control's property if the control was set to readonly or if it was set to visible = false. Such...
4
by: hvj | last post by:
I need to run a .NET1.1 program in a .NET2.0 CLR. The .NET1.1 exe starts correctly in .NET2.0. Now I want to debug in Visual Studio 2005. But when I try to open the .NET1.1 project, Visual Studio...
4
by: dreamamit2001 | last post by:
Hi, I would like to know the ASP.NET2.0's(Controls, Menubar, Validations, Object Data Souce Controls, Treeview Control) compatibility with IE5.0 browser on Mac OS. If I don't use Client side...
5
by: Benzi Eilon | last post by:
I have written a C# application which should run as a Windows Service. I must avoid having multiple instances of the application on one machine so I inserted the following code at the beginning of...
1
by: bhappy | last post by:
Hi all, Why <Frameset> tag is not worked in asp.net2.0.If anybody have any idea plz tell me.And which tag is used insted of <frameset> in asp.net2.0 to divide the window(Frame). Thanks, Aswath.
1
by: PMBTech | last post by:
Here's the deal. I want to find out if I can set my servers up to run NET1.1 and NET2.0. Currently they are setup to run NET1.1. They are running WIN2Ksp4 and IIS 5.0. I know the 2 NET versions...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.