473,378 Members | 1,607 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.

how can I protect my assembly by use strongnameidentitypermission with .NET 2.0?

Hi, all
In .NET 1.1, I can protect my assembly by use "StrongNameIdentityPermission", so only the caller with the special StrongName Sign can call my functions in the important assembly.

But how can I do this with .NET 2.0? I find some detail with this topic from a link as below
http://msdn.microsoft.com/en-us/libr...ermission.aspx

In the .NET Framework versions 1.0 and 1.1, identity permissions cannot have an Unrestricted permission state value. In the .NET Framework version 2.0, identity permissions can have any permission state value. This means that in version 2.0, identity permissions have the same behavior as permissions that implement the IUnrestrictedPermission interface. That is, a demand for an identity always succeeds, regardless of the identity of the assembly, if the assembly has been granted full trust. For information on executing version 2.0 applications with version 1.1 CAS policy, see <legacyV1CASPolicyElement.

My problem is :"a demand for an identity always succeeds, regardless of the identity of the assembly, if the assembly has been granted full trust."

Any advice is welcome, thank you
--

Best regards,
Ares
Sep 8 '08 #1
2 2134
"Ares Chen" <ar**@xizhang.comwrote in message
news:74**********************************@microsof t.com...
My problem is :"a demand for an identity always succeeds, regardless of
the identity of the assembly, if the assembly has been granted full
trust."

Well, that's why it's called "Full Trust", right? Given that a full trust
assembly can do any imaginable tricks with unmanaged code anyway, if really
needed, it could override any and all security checks, so why bother?
Sep 8 '08 #2
Thank you for your reply. Well, I know that is full trust, but I also know
any other permission (e.g. Registerpermission) still can be used even the
assembly is full trust. This is the key point.

anyway, I just want to know: how can I protect the assembly by use
StrongNameIdentityPermission , even the caller assembly has been granted
full trust? The important thing is : we can not control the caller, right?

thank you

--

Best regards,
Ares

"Pavel Minaev" <in****@gmail.comдÈëÏûÏ¢
news:#e**************@TK2MSFTNGP03.phx.gbl...
"Ares Chen" <ar**@xizhang.comwrote in message
news:74**********************************@microsof t.com...
>My problem is :"a demand for an identity always succeeds, regardless of
the identity of the assembly, if the assembly has been granted full
trust."


Well, that's why it's called "Full Trust", right? Given that a full trust
assembly can do any imaginable tricks with unmanaged code anyway, if
really needed, it could override any and all security checks, so why
bother?
Sep 8 '08 #3

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

Similar topics

1
by: Chris | last post by:
I have seen the posts on various places on the internet about .NET framework mismatch issues and I don't think that is my problem. ; ) When I execute the following C++.NET code: String...
0
by: David Riddiford | last post by:
Hi I am trying to protect a class from being used by anything other than the application for which it was intended with StrongNameIdentityPermission using declarative code access security In my...
2
by: James Hadwen | last post by:
I'm not sure whether I'm doing something wrong, or StrongNameIdentityPermission just doesn't work in 2.0 beta 2 yet. public class Class1 { public Class1() {...
2
by: | last post by:
I am having a little bit of trouble with the syntax using attributes in classes. The compiler always complaints (VC ++ 2002) on StrongNameIdentityPermission. :-( The intention is secure my...
6
by: Brad | last post by:
I've just used StrongNameIdentityPermission at the class level and it works fine. Can I use it similar to the following for the entire assembly?...
3
by: Marty | last post by:
Hi, My main application is calling a couple of dll assembly that we made. I want to secure those dll assembly so they can't be used by a third party. I did a couple of test with on both...
0
by: Simon Hart | last post by:
I can't seem to get this to work. I have applied the above attribute to a class library thats installed in the GAC. I am trying to use this shared assembly from a C# ASP.NET web form, but I am...
0
by: archana | last post by:
Hi all, I am having application in 2003 where i have one class library and two console application. In class library i have one class to which i set strongnameidentitypermission. When i try...
8
by: puzzlecracker | last post by:
is there a way to create a library (assembly/dll) where I can only export few class? I don't want client to use or know about other internal classes in the assembly. Thanks
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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...

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.