One way is precompiling ..second is publishing your code instead of an XCopy deployment..Third way is via a sound architecture
For every page create a user control which will contain UI and logic..compile all these controls in a seperate assembly and load them on demand..This way even if user gets to aspx they will find just plain files with no code since code is inside dll..to
secure dll use obfuscation
~ Remember To Mark The Post(s) That Helped You As The ANSWER ~
Shakti Singh Tanwar
.Net Trainer (MCP,MCAD.net,MCSD.net,MCTS,MCPD.net[web])
Can you provide more details. Are you trying to protect plain asp code or asp.net code. From whom you are trying to protect, the person who has access to the file system to read your code or are you trying to prevent users from reading your code in web server.
Pre-Compiling and publishing your code may help but the user who would be viewing this code would be authorised user of the web server, so there is no question of unauthorized user.
ASP or ASP.net code is never sent to the client browser but renders to pure HTML so there is no question of viewing the source code.
Hope this gives you some idea or please elaborate your requirement.
thedjay
Member
2 Points
9 Posts
Protecting asp code
May 20, 2011 05:28 PM|LINK
Hi members how can i protect my asp code from being read by unauthorised users
AZMatt
Star
10648 Points
1896 Posts
Re: Protecting asp code
May 20, 2011 05:56 PM|LINK
You can precompile your code...
http://msdn.microsoft.com/en-us/library/bb398860.aspx
Matt
Shakti Singh...
Star
10870 Points
1827 Posts
Re: Protecting asp code
May 20, 2011 07:22 PM|LINK
One way is precompiling ..second is publishing your code instead of an XCopy deployment..Third way is via a sound architecture
For every page create a user control which will contain UI and logic..compile all these controls in a seperate assembly and load them on demand..This way even if user gets to aspx they will find just plain files with no code since code is inside dll..to secure dll use obfuscation
Shakti Singh Tanwar
.Net Trainer (MCP,MCAD.net,MCSD.net,MCTS,MCPD.net[web])
GPankaj
Contributor
4588 Points
768 Posts
Re: Protecting asp code
May 23, 2011 01:59 PM|LINK
Can you provide more details. Are you trying to protect plain asp code or asp.net code. From whom you are trying to protect, the person who has access to the file system to read your code or are you trying to prevent users from reading your code in web server. Pre-Compiling and publishing your code may help but the user who would be viewing this code would be authorised user of the web server, so there is no question of unauthorized user.
ASP or ASP.net code is never sent to the client browser but renders to pure HTML so there is no question of viewing the source code.
Hope this gives you some idea or please elaborate your requirement.
jkmaheta
Member
254 Points
77 Posts
Re: Protecting asp code
May 27, 2011 09:03 AM|LINK
Publish your web site and place all code inside Assembly, not require to deploye code file.
You can offuscate your code and protect it from being ready by anyother disassembler. Your aspx file will remain as it is.
jkmaheta
Member
254 Points
77 Posts
Re: Protecting asp code
May 27, 2011 09:03 AM|LINK
Publish your web site and place all code inside Assembly, not require to deploye code file.
You can offuscate your code and protect it from being ready by anyother disassembler. Your aspx file will remain as it is.