Saturday 15 January 2011

asp.net - Updating IP address in config -



asp.net - Updating IP address in config -

newbie question here, trying alter ip address of our database server. in our config.cs have:

public class config { private const string developmentip = "127.0.0.1"; private const string productionip = "199.199.199.199";

but on live server have compiled site. possible alter ip address without having recompile entire application? possible manually edit live site new ip address?

you should never maintain connectionstring in source code.

instead, want maintain connectionstring in web.config. if worry hacking web.config , can decrypt using aspnet_regiis.exe (which not original question).

but on live server have compiled site. possible alter ip address without having recompile entire application? possible manually edit live site new ip address?

answer no. have hard-coded ip address within config.cs. need update it, , re-compile application.

asp.net web-config app-config

No comments:

Post a Comment