473,324 Members | 2,356 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,324 software developers and data experts.

Obfuscating web apps

Hi all,

This is partly a question, partly looking for feedback.

I've developed a web app that may be distributed to a few companies,
and I'd like to obfuscate the code. I haven't tried this with a web
app yet, let alone an ASP.NET 2.0 app.

Right now I'm publishing my web app as non-updateable, so I've got an
App_Code dll for about 15 or so classes, and then several dozen for the
ASPX pages.

I haven't used Dotfuscator before, so I jumped in right away and
obfuscated the App_Code dll... even as I copied the obfuscated dll to
the webserver, I realized this would break things since my ASPX pages
relied on those class libraries. So, to obfuscate my business logic, I
need to include all my ASPX pages in the process so the symbols are
correct.

It's only a few dozen pages, but each time a page is added, I now need
to modify the dotfuscator project. This got me thinking:

- Is there any way to tell VS to compile all pages together in a single
DLL (like VS 2003)?
- Anyone have tips/experiences about dotfuscating their web
applications? I'm guessing I must precompile everything for this to
work correctly (which is ok, it's what I want to do for now).

Thanks for the feedback,
Tom

Feb 14 '06 #1
4 2155
I think the new WebDeployment beta project is what you might be looking for:
http://msdn.microsoft.com/asp.net/re...p/default.aspx

Doesn't work in Visual Web Developer express though :(

Karl
--
http://www.openmymind.net/

<an******@comcast.net> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hi all,

This is partly a question, partly looking for feedback.

I've developed a web app that may be distributed to a few companies,
and I'd like to obfuscate the code. I haven't tried this with a web
app yet, let alone an ASP.NET 2.0 app.

Right now I'm publishing my web app as non-updateable, so I've got an
App_Code dll for about 15 or so classes, and then several dozen for the
ASPX pages.

I haven't used Dotfuscator before, so I jumped in right away and
obfuscated the App_Code dll... even as I copied the obfuscated dll to
the webserver, I realized this would break things since my ASPX pages
relied on those class libraries. So, to obfuscate my business logic, I
need to include all my ASPX pages in the process so the symbols are
correct.

It's only a few dozen pages, but each time a page is added, I now need
to modify the dotfuscator project. This got me thinking:

- Is there any way to tell VS to compile all pages together in a single
DLL (like VS 2003)?
- Anyone have tips/experiences about dotfuscating their web
applications? I'm guessing I must precompile everything for this to
work correctly (which is ok, it's what I want to do for now).

Thanks for the feedback,
Tom

Feb 14 '06 #2
You can precompile the web site. See:
http://msdn2.microsoft.com/en-us/library/399f057w.aspx

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
We got a sick zebra a hat,
you ultimate tuna.
<an******@comcast.net> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hi all,

This is partly a question, partly looking for feedback.

I've developed a web app that may be distributed to a few companies,
and I'd like to obfuscate the code. I haven't tried this with a web
app yet, let alone an ASP.NET 2.0 app.

Right now I'm publishing my web app as non-updateable, so I've got an
App_Code dll for about 15 or so classes, and then several dozen for the
ASPX pages.

I haven't used Dotfuscator before, so I jumped in right away and
obfuscated the App_Code dll... even as I copied the obfuscated dll to
the webserver, I realized this would break things since my ASPX pages
relied on those class libraries. So, to obfuscate my business logic, I
need to include all my ASPX pages in the process so the symbols are
correct.

It's only a few dozen pages, but each time a page is added, I now need
to modify the dotfuscator project. This got me thinking:

- Is there any way to tell VS to compile all pages together in a single
DLL (like VS 2003)?
- Anyone have tips/experiences about dotfuscating their web
applications? I'm guessing I must precompile everything for this to
work correctly (which is ok, it's what I want to do for now).

Thanks for the feedback,
Tom

Feb 14 '06 #3
Thanks to both of you. I have a question about the build process... I
noticed on one of the pages
(http://msdn2.microsoft.com/en-us/library/ms227976.aspx) it says:

--
If your Web site is not an Internet Information Services (IIS)
application and therefore has no entry in the IIS metabase, used the
following value for the -v switch.

aspnet_compiler -p physicalOrRelativePath -v / targetPath
In this case, the physicalOrRelativePath parameter refers to the fully
qualified directory path in which the Web site files are located, or a
path relative to the current directory. The period (.) operator is
allowed in the physicalOrRelativePath parameter. The -v switch
specifies a root that the compiler will use to resolve application-root
references (for example, with the tilde (~) operator). When you specify
the value of / for the -v switch the compiler will resolve the paths
using the physical path as the root.

The targetPath parameter is a physical path to the destination
directory
--

My application uses quite a bit of app-root references (ie, an image
with ~/images/blah.jpg as the source) -- I understand what the above
paragraph is saying, but is there a specific benefit to specifying this
(performance) parameter? In my case I want to _avoid_ this because
I'm allowing the user to install in a directory of their choice, thus,
I need to resolution to happen at runtime. Just trying to understand
the usefulness of the switch.

Thank you for the info! The only oddity I noticed is that the publish
didn't copy images -- it only copied the marker files and the dlls.
The docs seem to indicate that it should copy everything. Perhaps I
missed an option in there...

Feb 14 '06 #4
On 14 Feb 2006 10:41:20 -0800, an******@comcast.net wrote:

aspnet_compiler -p physicalOrRelativePath -v / targetPath
In this case, the physicalOrRelativePath parameter refers to the fully
qualified directory path in which the Web site files are located, or a
path relative to the current directory. The period (.) operator is
allowed in the physicalOrRelativePath parameter. The -v switch
specifies a root that the compiler will use to resolve application-root
references (for example, with the tilde (~) operator). When you specify
the value of / for the -v switch the compiler will resolve the paths
using the physical path as the root.


I've been curious about this switch ever since the precompiler command
line utility appeared. I have not actually been able to see a
difference at compile time - all the ~ paths still get resolved at
runtime and not by the compiler. (This is true when using -v in
conjuntion with -p). There may be some special case where the
precompiler actually steps in to resolve a ~, but I have not found the
special case yet.

One impact the -v switch does have is that the -v paramter is used to
select the directory in Temporary ASP.NET Files to do the code
generation and compiling. So far that is the only impact I've seen of
twiddling with -v.

--
Scott
http://www.OdeToCode.com/blogs/scott/
Feb 15 '06 #5

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

Similar topics

7
by: steve | last post by:
Hi, I know there are a few free and paid php source code encryption scripts around. Has anyone used one, and any feedback? I am interested in encrypting source that is placed on a remote host....
9
by: Saso Zagoranski | last post by:
Hi! I have recently completed an application, written in C#. When I opened one of the files with a hex editor I was amazed by the lack of protection for the assemblies. My application uses SQL...
4
by: Manel G | last post by:
Hi This line works both in the debug and release mode: Me.Cursor = New Cursor(Me.GetType(), "NoCur.cur") After obfuscating the release exe I got this error message: ...
7
by: Paul Aspinall | last post by:
Hi I have developed a C# app which uses SQL Stored procs... which I plan to deploy as a single / low user version on MSDE. My SP's all have 'meaningful' names. However, as I want to protect my...
3
by: SStory | last post by:
I would like to see some discussion on what most small-time shops do for protecting there code---obfuscating. I can't afford professional dotfuscator at present, but would like to obfuscate and...
0
by: Meena | last post by:
Is it possible to obfuscate a Webservice and use it with my client application (which is also obfuscated) ? I tried obfuscating the webservice, but I get the error, 'Could not load type...
2
by: JJ | last post by:
I'm using Visual Studio 2005. I'm trying to protect my website dll files as best as possible using obfuscating approach. I've tried to use Dotfuscator Community Edition (comes with Vis Studio) to...
0
by: JJ | last post by:
I'm using Visual Studio 2005. I'm trying to protect my website dll files as best as possible using obfuscating approach. I've tried to use Dotfuscator Community Edition (comes with Vis Studio) to...
2
by: NIKHILUNNIKRISHNAN | last post by:
Hi, My name is Nikhil. I am new to programming.I am obfuscating a C# solution using Dotfuscator. The output of the soultion is a UI along with a setup to install the application. The setup is...
0
by: rhoney | last post by:
I was trying to obfuscate a .NET 3.5 app with Dotfuscator 4. I have 5 buttons on the main Window of the app. After obfuscating, 3 of those buttons are working fine. However, nothing happens on...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.