Click here to Skip to main content
15,900,511 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
how do i make the web pages code behind C# read only
a user can only read it in RUN mode and non RUN mode

EG:

After i'm completing the project, i need to pass to the 3rd party to run it they can open the project, viewcode and run. but they shouldn't Edit the codbehind file.

can any 1 helps me. can i know the code
Posted
Updated 24-Jul-13 0:00am
v3
Comments
Dholakiya Ankit 24-Jul-13 6:02am    
you required when publishing or you are giving source to some one then you can not do that one
kesav prakash 24-Jul-13 9:06am    
when i'm giving the sourcecode to some one
Prasad Khandekar 26-Jul-13 6:19am    
Hello Kesav,

How many times have you not changed the code which you have downloaded from internet, even from gitHub or codeplex. What stopped you from not altering the code. The fact you are giving out the source code it will permit the the receiver to alter it.

Regards,
kesav prakash 26-Jul-13 6:28am    
is there any way at least a small security that others shouldn't edit the code. make the file readonly format

1 solution

Add it to the source control tools like TFS and give them the read only access

http://msdn.microsoft.com/en-us/vstudio/ff637362.aspx[^]
 
Share this answer
 
Comments
Prasad Khandekar 26-Jul-13 6:21am    
Just a note, it won't prevent the receiver from altering the code. Which I believe is the basic problem kesav is having. Nice suggestion though.

Regards,
bbirajdar 27-Jul-13 9:05am    
You can give the read only rights to the TFS users. Nobody will be able to check in the altered code.. It is possible to hack the local copy and alter it but cannot alter the source in the TFS

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900