When Public isnt really Public
-
The way I'm going to explain is a little crazy... You can mask the DLL with some other filename (such as Filename.dat) and crypt it with, for example, a 3DES algorithm (provided in .NET Framework!). After this a some kind of bootstrapper is needed to decrpyt, rename, install the DLL in the GAC and start the main application. When the application is closed, the boostrapper removes the DLL from the GAC. to install the DLL in the GAC you can use the utility provided with the .NET Framework. My solution is ingenious, isn't it? :cool:
to install the DLL in the GAC you can use the utility provided with the .NET Framework. This I am curious about, I wasnt aware that it was possible to control the GAC programmatically. Can you post up some more information post.mode = postmodes.signature; SELECT everything FROM everywhere WHERE something = something_else; > 1 Row Returned > 42
-
MrEyes wrote: The company I work for has found out that other companies are using the public interface of this DLL to perform processing on their own data. And your company doesn't have any lawyers to stop this? If you already know it why not bring those other companies to court?
And your company doesn't have any lawyers to stop this? If you already know it why not bring those other companies to court? Without get into the meat of the issue, the problem is highly political as we have "relationships" with these third parties. I have been directed from above to find a solution to the problem without going down the lawyer route. post.mode = postmodes.signature; SELECT everything FROM everywhere WHERE something = something_else; > 1 Row Returned > 42
-
You mean: IlMerge
Yup.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Homosexuality in Christianity Judah Himango
-
Hopefully I am missing the point here, I have a simple question about public functions/classes Lets says I create Widget application X, due to the complexity of the application the design dictates that some of the functionality should be farmed out into various DLLs. So now I have: MainWidgetApp.exe WidgetHelper.dll WidgetHelper.dll has various Public functions/class that can be referenced by the main app. Once this setup gets deployed out into the real world there is nothing to stop another developer making a reference to the public functions/classes in the DLL. So the question is how can I stop this from happening whilst still being able to keep the design of an Exe dependent on various DLLs post.mode = postmodes.signature; SELECT everything FROM everywhere WHERE something = something_else; > 1 Row Returned > 42
Look into the "Licensing Components and Controls" topic of the .NET Framework Developer's Guide. Also checkout third-party licensing components, such as Aspose.License for example. I think it is free (although with no support). http://www.aspose.com/Products/Aspose.License/[^]
-
The way I'm going to explain is a little crazy... You can mask the DLL with some other filename (such as Filename.dat) and crypt it with, for example, a 3DES algorithm (provided in .NET Framework!). After this a some kind of bootstrapper is needed to decrpyt, rename, install the DLL in the GAC and start the main application. When the application is closed, the boostrapper removes the DLL from the GAC. to install the DLL in the GAC you can use the utility provided with the .NET Framework. My solution is ingenious, isn't it? :cool:
Does it really need to be in the GAC? If not, don't put it there, just do this to the assembely in the directory where your application lives. Of course, it wouldn't take a rocket scientist to capture the dll while the app is actually running, then copy it elsewhere for later use. Or even get it accidentally if the app quit under abnormal circumstances (eg. was killed with TerminateProcess()). Matt Gerrans
-
Hopefully I am missing the point here, I have a simple question about public functions/classes Lets says I create Widget application X, due to the complexity of the application the design dictates that some of the functionality should be farmed out into various DLLs. So now I have: MainWidgetApp.exe WidgetHelper.dll WidgetHelper.dll has various Public functions/class that can be referenced by the main app. Once this setup gets deployed out into the real world there is nothing to stop another developer making a reference to the public functions/classes in the DLL. So the question is how can I stop this from happening whilst still being able to keep the design of an Exe dependent on various DLLs post.mode = postmodes.signature; SELECT everything FROM everywhere WHERE something = something_else; > 1 Row Returned > 42
-
to install the DLL in the GAC you can use the utility provided with the .NET Framework. This I am curious about, I wasnt aware that it was possible to control the GAC programmatically. Can you post up some more information post.mode = postmodes.signature; SELECT everything FROM everywhere WHERE something = something_else; > 1 Row Returned > 42
The utility name is gacutil.exe, you can find it via-code in %windir%\Microsoft.NET\Framework\v1.1.4322\gacutil.exe to install an assembly in the GAC use the command gacutil /i "Assembly Path" for example gacutil /i "D:\Projects\MyPrj\Release\bin\MyLib.dll" to remove it gacutil /u AssemblyName for example gacutil /u "MyLib.dll" It isn't complicated. To improve performances you can install the assembly in the GAC with the ngen.exe (you can find it in the same directory of gacutil) utility. That program translates the assembly in a native image (i.e. an exe or dll file containing only machine-level code). To di this, use the command: ngen "Assembly Path" for example ngen "D:\Projects\MyPrj\Release\bin\MyLib.dll" to remove it you can use ngen and gacutil both. the first way is ngen /delete MyLib.dll the second one is gacutil /u MyLib.dll to run those commands via-code (C#) System.Diagnostic.Process.Start("Exe Path", "Arguments); To avoid console is shown, you should learn more about Process class. I hope I've been helpful.
-
Does it really need to be in the GAC? If not, don't put it there, just do this to the assembely in the directory where your application lives. Of course, it wouldn't take a rocket scientist to capture the dll while the app is actually running, then copy it elsewhere for later use. Or even get it accidentally if the app quit under abnormal circumstances (eg. was killed with TerminateProcess()). Matt Gerrans
the problem is that you cannot copy assemblies from the GAC because it is not a phisical directory! go to %windir%\assembly\GAC and try to copy a file from there. Use the command prompt also.
-
the problem is that you cannot copy assemblies from the GAC because it is not a phisical directory! go to %windir%\assembly\GAC and try to copy a file from there. Use the command prompt also.
Wanna bet? You just need to know where to look. Anyway I don't think any directory is a physical directory. Nothing in software is "physical." Of course, there are physical magnetic dipoles that are pointing in one direction or another, or transistors that have in particular electrical states and those are physical properties, but the concepts of files and directories are more metaphorical than physical. Matt Gerrans
-
Wanna bet? You just need to know where to look. Anyway I don't think any directory is a physical directory. Nothing in software is "physical." Of course, there are physical magnetic dipoles that are pointing in one direction or another, or transistors that have in particular electrical states and those are physical properties, but the concepts of files and directories are more metaphorical than physical. Matt Gerrans
I tried to go to %windir%\assembly with windows explorer, and it doesn't allow you to copy assemblies. I tried to go to the same dir with the command prompt, and the 'dir' command lists some assemblies (without extension!), but the 'copy' command doesn't work. So... [ITA] Tozzi ha ragione: Gaia si sta liberando di noi. [ENG] Tozzi is right: Gaia is obliterating us.