Connecting Tech Pros Worldwide Help | Site Map

how not to expose source code

Tina
Guest
 
Posts: n/a
#1: Aug 11 '06
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


Alvin Bruney [MVP]
Guest
 
Posts: n/a
#2: Aug 11 '06

re: how not to expose source code


>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" <TinaMSeaburn@nospamexcite.comwrote in message
news:%23W6evaNvGHA.1808@TK2MSFTNGP06.phx.gbl...
Quote:
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
>

Paul Hadfield
Guest
 
Posts: n/a
#3: Aug 11 '06

re: how not to expose source code


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

"Tina" <TinaMSeaburn@nospamexcite.comwrote in message
news:%23W6evaNvGHA.1808@TK2MSFTNGP06.phx.gbl...
Quote:
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
>

Tina
Guest
 
Posts: n/a
#4: Aug 11 '06

re: how not to expose source code


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/owcwrote in message
news:OYXcQXOvGHA.3964@TK2MSFTNGP04.phx.gbl...
Quote:
Quote:
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" <TinaMSeaburn@nospamexcite.comwrote in message
news:%23W6evaNvGHA.1808@TK2MSFTNGP06.phx.gbl...
Quote:
>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
>>
>
>

GaryDean
Guest
 
Posts: n/a
#5: Aug 11 '06

re: how not to expose source code


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/200...200208jg_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.

--
Regards,
Gary Blakely
Dean Blakely & Associates
www.deanblakely.com
"Tina" <TinaMSeaburn@nospamexcite.comwrote in message
news:%23W6evaNvGHA.1808@TK2MSFTNGP06.phx.gbl...
Quote:
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
>

Alvin Bruney [MVP]
Guest
 
Posts: n/a
#6: Aug 12 '06

re: how not to expose source code


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" <TinaMSeaburn@nospamexcite.comwrote in message
news:%23ysctcWvGHA.5084@TK2MSFTNGP04.phx.gbl...
Quote:
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/owcwrote in message
news:OYXcQXOvGHA.3964@TK2MSFTNGP04.phx.gbl...
Quote:
Quote:
>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" <TinaMSeaburn@nospamexcite.comwrote in message
>news:%23W6evaNvGHA.1808@TK2MSFTNGP06.phx.gbl...
Quote:
>>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
>>>
>>
>>
>
>

Tina
Guest
 
Posts: n/a
#7: Aug 14 '06

re: how not to expose source code


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 [MVP]" <www.lulu.com/owcwrote in message
news:%23geY1xlvGHA.2436@TK2MSFTNGP06.phx.gbl...
Quote:
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" <TinaMSeaburn@nospamexcite.comwrote in message
news:%23ysctcWvGHA.5084@TK2MSFTNGP04.phx.gbl...
Quote:
>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/owcwrote in message
>news:OYXcQXOvGHA.3964@TK2MSFTNGP04.phx.gbl...
Quote:
>>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" <TinaMSeaburn@nospamexcite.comwrote in message
>>news:%23W6evaNvGHA.1808@TK2MSFTNGP06.phx.gbl.. .
>>>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
>>>>
>>>
>>>
>>
>>
>
>

Alvin Bruney [MVP]
Guest
 
Posts: n/a
#8: Aug 15 '06

re: how not to expose source code


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" <TinaMSeaburn@nospamexcite.comwrote in message
news:O1iDOjzvGHA.3964@TK2MSFTNGP04.phx.gbl...
Quote:
>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 [MVP]" <www.lulu.com/owcwrote in message
news:%23geY1xlvGHA.2436@TK2MSFTNGP06.phx.gbl...
Quote:
>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" <TinaMSeaburn@nospamexcite.comwrote in message
>news:%23ysctcWvGHA.5084@TK2MSFTNGP04.phx.gbl...
Quote:
>>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/owcwrote in message
>>news:OYXcQXOvGHA.3964@TK2MSFTNGP04.phx.gbl...
>>>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" <TinaMSeaburn@nospamexcite.comwrote in message
>>>news:%23W6evaNvGHA.1808@TK2MSFTNGP06.phx.gbl. ..
>>>>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
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>

Closed Thread