Saturday, April 4, 2009

Web.config ConnectionString settings for asp.net 2.0

it should be 10 minute change , but i did spent 2 hours to change this.

web.config
----------------




-----------------

CodeBehind
-----------------------
System.Configuration;
System.web.Configuration;

string connectionString=
System.Web.Configuration.WebConfigurationManager.ConnectionStrings["connectionstring"].ConnectionString;
-------------------------------



to make this work we need to add System.Configuration.dll , this is not in system.dll


we can encrypt connection string ,
you can go through this ..

http://msdn.microsoft.com/en-us/magazine/cc163849.aspx#S2


-venkat.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.