how not to expose source code

T

Tina

In 1.1 I used to use a WebControlLibrary to hold code I didn't want to
expose when I distributed a component. The code would compile to a separate
dll and could not be viewed when used in a vs.net project. That worked fine
and I assume it will still work fine in 2.0.

However, in 2.0 I tried to use a simple Class library project that also
compiles to a separate dll. However when I distribute the dll, the source
code is still visible when debugging in vs.net. Am I doing something wrong
here or do class library dlls contain source code?

To do what I want to do should I continue to use the WebControlLibrary in
2.0 or is there a better alternative.

Thanks,

T
 
A

Alvin Bruney [MVP]

The code would compile to a separate
dll and could not be viewed when used in a vs.net project.
Not sure what you mean here, if the dll is available to the client, the
source code is wide open for viewing purposes. Wide open. About the best you
can do is obfuscate it and that will make it a bit more difficult to
decompile.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
 
P

Paul Hadfield

A quick thought, are you sure you compiled the 2.0 version in release mode,
rather than debug?
 
T

Tina

Alvin:
Compiled dlls have MSIL code but not the real source code. Right?

I'm seeing the source code - comments and all. Why would a dll need the
source code?

T

Alvin Bruney said:
The code would compile to a separate
dll and could not be viewed when used in a vs.net project.
Not sure what you mean here, if the dll is available to the client, the
source code is wide open for viewing purposes. Wide open. About the best
you can do is obfuscate it and that will make it a bit more difficult to
decompile.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Tina said:
In 1.1 I used to use a WebControlLibrary to hold code I didn't want to
expose when I distributed a component. The code would compile to a
separate dll and could not be viewed when used in a vs.net project. That
worked fine and I assume it will still work fine in 2.0.

However, in 2.0 I tried to use a simple Class library project that also
compiles to a separate dll. However when I distribute the dll, the
source code is still visible when debugging in vs.net. Am I doing
something wrong here or do class library dlls contain source code?

To do what I want to do should I continue to use the WebControlLibrary in
2.0 or is there a better alternative.

Thanks,

T
 
G

GaryDean

Tina,
I'm guessing that your distributed project in on the same machine as the
source file and a reference is maintained to the source because you
connected to the dll via reference. The dlls contain msil but not your real
source. Move it to another computer and try again.

However, msil exposes your code to anyone really wanting to steal your
intellectual property. A good article on this issue I found is at
http://www.aspnetpro.com/opinion/2002/08/asp200208jg_o/asp200208jg_o.asp .

You can always use NGen.exe if you are only going to run on Windows
platforms (duh).

See you at the meeting this afternoon.
 
A

Alvin Bruney [MVP]

As I said, it's rather easy to take a dll and pop it into full source code
with tools like salamangar. In fact, the salamagar tool even goes as far as
showing you the original code comments along with exact variable names etc
etc.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Tina said:
Alvin:
Compiled dlls have MSIL code but not the real source code. Right?

I'm seeing the source code - comments and all. Why would a dll need the
source code?

T

Alvin Bruney said:
The code would compile to a separate
dll and could not be viewed when used in a vs.net project.
Not sure what you mean here, if the dll is available to the client, the
source code is wide open for viewing purposes. Wide open. About the best
you can do is obfuscate it and that will make it a bit more difficult to
decompile.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Tina said:
In 1.1 I used to use a WebControlLibrary to hold code I didn't want to
expose when I distributed a component. The code would compile to a
separate dll and could not be viewed when used in a vs.net project.
That worked fine and I assume it will still work fine in 2.0.

However, in 2.0 I tried to use a simple Class library project that also
compiles to a separate dll. However when I distribute the dll, the
source code is still visible when debugging in vs.net. Am I doing
something wrong here or do class library dlls contain source code?

To do what I want to do should I continue to use the WebControlLibrary
in 2.0 or is there a better alternative.

Thanks,

T
 
T

Tina

I looked at my dll with a hex viewer. The source code is not there. The
msil is. The comments are not there.

is this a free tool?
T

Alvin Bruney said:
As I said, it's rather easy to take a dll and pop it into full source code
with tools like salamangar. In fact, the salamagar tool even goes as far
as showing you the original code comments along with exact variable names
etc etc.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Tina said:
Alvin:
Compiled dlls have MSIL code but not the real source code. Right?

I'm seeing the source code - comments and all. Why would a dll need the
source code?

T

Alvin Bruney said:
The code would compile to a separate
dll and could not be viewed when used in a vs.net project.
Not sure what you mean here, if the dll is available to the client, the
source code is wide open for viewing purposes. Wide open. About the best
you can do is obfuscate it and that will make it a bit more difficult to
decompile.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


In 1.1 I used to use a WebControlLibrary to hold code I didn't want to
expose when I distributed a component. The code would compile to a
separate dll and could not be viewed when used in a vs.net project.
That worked fine and I assume it will still work fine in 2.0.

However, in 2.0 I tried to use a simple Class library project that also
compiles to a separate dll. However when I distribute the dll, the
source code is still visible when debugging in vs.net. Am I doing
something wrong here or do class library dlls contain source code?

To do what I want to do should I continue to use the WebControlLibrary
in 2.0 or is there a better alternative.

Thanks,

T
 
A

Alvin Bruney [MVP]

No but you can test it here http://www.remotesoft.com/salamander/ the
results should convince you that intellectual property protection in
applications is not really possible - although the same people at the link
above claim to have an obfuscator that is bullet proof. However, at some
point in time, the cpu needs unobfuscated code to execute...

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Tina said:
I looked at my dll with a hex viewer. The source code is not there. The
msil is. The comments are not there.

is this a free tool?
T

Alvin Bruney said:
As I said, it's rather easy to take a dll and pop it into full source
code with tools like salamangar. In fact, the salamagar tool even goes as
far as showing you the original code comments along with exact variable
names etc etc.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Tina said:
Alvin:
Compiled dlls have MSIL code but not the real source code. Right?

I'm seeing the source code - comments and all. Why would a dll need the
source code?

T

"Alvin Bruney [MVP]" <www.lulu.com/owc> wrote in message
The code would compile to a separate
dll and could not be viewed when used in a vs.net project.
Not sure what you mean here, if the dll is available to the client, the
source code is wide open for viewing purposes. Wide open. About the
best you can do is obfuscate it and that will make it a bit more
difficult to decompile.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


In 1.1 I used to use a WebControlLibrary to hold code I didn't want to
expose when I distributed a component. The code would compile to a
separate dll and could not be viewed when used in a vs.net project.
That worked fine and I assume it will still work fine in 2.0.

However, in 2.0 I tried to use a simple Class library project that
also compiles to a separate dll. However when I distribute the dll,
the source code is still visible when debugging in vs.net. Am I doing
something wrong here or do class library dlls contain source code?

To do what I want to do should I continue to use the WebControlLibrary
in 2.0 or is there a better alternative.

Thanks,

T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top