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

Code access protection

Hi everyone,

We develop a GUI application and Class Library. Both are written in C#.
The Class Library has public interfaces with a lot of functionality,
which can be accessed from our GUI application, but also from any other
developer who using our product. There are a couple of fucntions in this
Class Library that we want to hide (or at list to protect) from other
developers. Those functions are for our internal usage only. I mean we
want that the only who can call them is our GUI application.

Is there any way to do that?

Thanks,
Maxim.
Nov 16 '05 #1
3 1148
Maxim,

You can definitely do this. What you would have to do is give your
client application a strong name. Once you do that, you can get the public
key token for the strong name (using the secutil.exe tool) and then apply
the following attribute to your methods:

[StrongNameIdentityPermission(SecurityAction.LinkDe mand, PublicKey = "value
from secutil.exe")]
public void MyFunction()
{
...
}

However, this will mean that all of the assemblies that the client
references needs to be strong named as well.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ma***@scp.co.il> wrote in message
news:84**************************@posting.google.c om...
Hi everyone,

We develop a GUI application and Class Library. Both are written in C#.
The Class Library has public interfaces with a lot of functionality,
which can be accessed from our GUI application, but also from any other
developer who using our product. There are a couple of fucntions in this
Class Library that we want to hide (or at list to protect) from other
developers. Those functions are for our internal usage only. I mean we
want that the only who can call them is our GUI application.

Is there any way to do that?

Thanks,
Maxim.

Nov 16 '05 #2
Thank you Nicholas. I will try to do it.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:<#$**************@TK2MSFTNGP12.phx.gbl>...
Maxim,

You can definitely do this. What you would have to do is give your
client application a strong name. Once you do that, you can get the public
key token for the strong name (using the secutil.exe tool) and then apply
the following attribute to your methods:

[StrongNameIdentityPermission(SecurityAction.LinkDe mand, PublicKey = "value
from secutil.exe")]
public void MyFunction()
{
...
}

However, this will mean that all of the assemblies that the client
references needs to be strong named as well.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ma***@scp.co.il> wrote in message
news:84**************************@posting.google.c om...
Hi everyone,

We develop a GUI application and Class Library. Both are written in C#.
The Class Library has public interfaces with a lot of functionality,
which can be accessed from our GUI application, but also from any other
developer who using our product. There are a couple of fucntions in this
Class Library that we want to hide (or at list to protect) from other
developers. Those functions are for our internal usage only. I mean we
want that the only who can call them is our GUI application.

Is there any way to do that?

Thanks,
Maxim.

Nov 16 '05 #3
Thank you Nicholas I will try this.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:<#$**************@TK2MSFTNGP12.phx.gbl>...
Maxim,

You can definitely do this. What you would have to do is give your
client application a strong name. Once you do that, you can get the public
key token for the strong name (using the secutil.exe tool) and then apply
the following attribute to your methods:

[StrongNameIdentityPermission(SecurityAction.LinkDe mand, PublicKey = "value
from secutil.exe")]
public void MyFunction()
{
...
}

However, this will mean that all of the assemblies that the client
references needs to be strong named as well.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ma***@scp.co.il> wrote in message
news:84**************************@posting.google.c om...
Hi everyone,

We develop a GUI application and Class Library. Both are written in C#.
The Class Library has public interfaces with a lot of functionality,
which can be accessed from our GUI application, but also from any other
developer who using our product. There are a couple of fucntions in this
Class Library that we want to hide (or at list to protect) from other
developers. Those functions are for our internal usage only. I mean we
want that the only who can call them is our GUI application.

Is there any way to do that?

Thanks,
Maxim.

Nov 16 '05 #4

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

Similar topics

15
by: Enzo | last post by:
Hi Ng, It's possible to protect the source code of a js file? With PHP? Thanks in advance! Enzo
1
by: John Michael | last post by:
I have created some password routines to protect certain forms from access without a password. This allows me to create some security for apps that will be used on diff machines for users that...
4
by: David LACASSAGNE | last post by:
Is it possible to set a password to protect the code of an Access VBA project by automation (I already know how to to it manually)? David.
1
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
3
by: nathanvi | last post by:
Hi, i've a mdb access file and i launched Tools->Protection->SettingAutomaticProtection (sorry if translation isn't fine but the language in my PC is not english :-( ) two weeks ago .. In other...
5
by: guoqi zheng | last post by:
I often write some .dll component for other people. Because of CLR, I often find easily access to all source code of my .DLL file by using some kind of reflector. Is there an easy to protect my...
17
by: seberino | last post by:
How can a proprietary software developer protect their Python code? People often ask me about obfuscating Python bytecode. They don't want people to easily decompile their proprietary Python app....
17
by: Flic | last post by:
Is this possible? I know about a bit about ODBC and found how to import an ODBC database stored on the computer, however I am after accessing an SQL database stored on a webserver. I'd like to...
22
by: flit | last post by:
Hello All, I have a hard question, every time I look for this answer its get out from the technical domain and goes on in the moral/social domain. First, I live in third world with bad gov., bad...
16
by: Greg (codepug | last post by:
If one converts that .mdb into an .mde the code is secure but the tables can still be imported. Just for Very Basic protection, I have placed a Password on the database using the "Set Database...
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.