atromgame
atromgame

Reputation: 442

ASPX C# Code Security

I wire a web site using aspx and c#, and I want to encript my c# code ( .cs files) No boby see and change my code.

Ho can I do this?

Upvotes: 2

Views: 348

Answers (5)

KBBWrite
KBBWrite

Reputation: 4409

Use WebDeploy, which will make all the cs files into DLL

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=cfa66d50-90ce-49cb-b021-fefbd7a302ab

Upvotes: 0

Nikos Steiakakis
Nikos Steiakakis

Reputation: 5745

With ASP.NET you have the option of Publishing your web site, which will produce .aspx "placeholders" and will compile the code into binary .dlls. However you must make sure that you do not have the option "Allow this precompiled site to be updatable" checked, so that no code or markup is visible on the hosting server.

Upvotes: 1

user111013
user111013

Reputation:

Encrypting (or even obfuscating) your code is probably the wrong way to go about it.

Instead, ensure only authorised persons have access to that machine. People accessing the site through IIS won't be able to access any .cs files.

Even if you compile your application, all .NET Assemblies can still be disassembled. Obfuscation makes it more difficult, but not impossible.

Upvotes: 1

Curtis
Curtis

Reputation: 103368

You should "Publish" your site which will compile all the files into .dll files:

http://msdn.microsoft.com/en-us/library/20yh9f1b%28v=vs.80%29.aspx

Upvotes: 1

Tolgahan Albayrak
Tolgahan Albayrak

Reputation: 1759

compile and publish your web site. and you can try dotfuscator

Upvotes: 1

Related Questions