Click to See Complete Forum and Search --> : asp.net compiler


Rafeek
06-17-2007, 03:11 PM
hi all
i create web site (ASP.net 2.0 & C# 2005) .
i go to server and create virtual directory in IIS contain
(*.aspx + *.aspx.cs + web.config) .
any one work with this server can read my code & can read my web.config
it contian my connection string .

how can i compile my web to keep my code or web.config unread?

thax
RAfeek

Phil Weber
06-17-2007, 04:15 PM
If you create a Web Application Project, your *.cs files will be compiled into a DLL and you will not have to deploy the *.cs files to the Web server. See http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx for more information.

There are numerous articles online which show how to encrypt configuration data (such as connection strings) in your web.config file: http://www.google.com/search?q=asp.net+encrypt+connection+string