473,383 Members | 1,798 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,383 software developers and data experts.

Assembly Security.

Hi,
I have a solution with 2 projects.
The first creates a DLL. the second a EXE which references the DLL.
Some classes and functions within the DLL have to be public so I can use
them in the EXE project.

How do I stop others referencing my DLL and using its public functions.

Regards
Tim
Jul 21 '05 #1
6 1438
Hi Tim,

Thanks for your post!!

Based on my understanding, you want to export several public methods from a
DLL assembly, then limit the assembly that can call these methods. If I
misunderstand you, please feel free to tell me, thanks

First, in software area, protection and crack are against with each other
for a long time, there is no complete way of preventing the software from
being cracked. This is also true for .Net. Also, because of the .Net
assembly metadata and manifest, it is even much easier for hack to do
reverse engineering with the .Net assembly. I think Reflector is a good
point for this.

Ok, let's back to our topic. For your request, I think the first step we
should do is strong name our calling exe assembly, that is because only
strong named assembly can be only identified easily, it is like that
assembly has an identity.
Then, in our dll methods, we can use Assembly.GetCallingAssembly method to
get the assembly reference that is calling our methods. With the assembly
reference, we may use Assembly.GetName().GetPublicKey() to get the strong
name pulic key of the calling assembly. Then we can do the comparison and
fail the unexpected assembly calling.

I think the article below may give you some hint:
http://blogs.msdn.com/shawnfa/archiv...26/248114.aspx

There maybe some other good ways to get this done. And other community
members may give some good advise. Thanks
================================================== ==========
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #2
Hi Tim,

Does my reply make sense to you? Is your problem resolved? Please feel free
to feedback, thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #3
Hi Tim,

Does my reply make sense to you? Is your problem resolved? Please feel free
to feedback, thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #4
Hi, Sorry for the delay,

It did make sense thanks, I am also experimenting with the
System.Security.Permission.StrongNameIndentityPerm ission class.

Hope to have an answer soon.

Regards Tim

""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:po**************@TK2MSFTNGXA01.phx.gbl...
Hi Tim,

Does my reply make sense to you? Is your problem resolved? Please feel
free
to feedback, thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #5
Hi, Sorry for the delay,

It did make sense thanks, I am also experimenting with the
System.Security.Permission.StrongNameIndentityPerm ission class.

Hope to have an answer soon.

Regards Tim

""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:po**************@TK2MSFTNGXA01.phx.gbl...
Hi Tim,

Does my reply make sense to you? Is your problem resolved? Please feel
free
to feedback, thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #6
Hi Tim,

Thanks for your feedback.

Yes, StrongNameIndentityPermissionAttribute offers our the similiar
function. For more information, please refer to:
"How to Secure Your Assemblies"
http://www.developer.com/security/print.php/3415421

Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #7

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

Similar topics

15
by: Thomas Christmann | last post by:
Hi! I have a rather special question here. I'd like to write a wrapper for a .NET assembly, and register that on my server so that the people on my server call my assembly instead of the...
3
by: Daylor | last post by:
hi. im loading assembly from my computer and createInstance from it. till now it worked ok. now, im changing the path from : c:\myfolder\myassembly.dll to
3
by: jlea | last post by:
I'm receiving the error message shown below when I try to load an aspx file (C# web application) on our server. The web application works fine if I remove the reference to the dll so I know the...
13
by: Thomas Christmann | last post by:
Hi! I have a rather special question here. I'd like to write a wrapper for a .NET assembly, and register that on my server so that the people on my server call my assembly instead of the...
1
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.