Question :
I have a question regarding ASP.NET:
In the case of PHP when placing an application on the server means putting the application’s source code. In the case of ASP.NET, (specifically C # with pages in .aspx), is there any way to use it without exposing the source code?
If the application is only in C # it is possible to generate the executable, but in the case of ASP.NET, is it possible to separate the application running (on the client, suppose) from the source code?
Answer :
To host an ASP.NET application you must publish it first. During publishing the source code is compiled and the .cs files transformed into DLL’s . Therefore, the source code is not exposed as in PHP.
Take a look at how to do a post here .
Is your source code in a separate .cs (Code behind) file or is it embedded in Aspx? In any case, as already mentioned, VisualStudio generates a DLL per page .aspx, with its source code supposed to be secure.
I say supposedly because it is possible to decompile the bytecode of the DLL to generate source code in C #, VB.Net etc.
If you need an extra level of security, look for .Net dll scrambling solutions