how to encrypt a connection string in web.config file?
Answer Posted / anand gopal makwa munger
write the code on web.config file Like below
<configuration>
<appSettings/>
<connectionStrings>
<add name="Connection" providerName="System.Data.SqlClient" connectionString="server=abc\Sqlexpress;IntegratedSecurity=SSPI;DataBase=XYZ"/>
</connectionStrings>
</configuration>
and write the code Behind page(ie .cs File)
ConnectionStringSettings con = ConfigurationManager.ConnectionStrings["Connection"];
SqlConnection conn = new SqlConnection(con.ConnectionString);
Is This Answer Correct ? | 0 Yes | 5 No |
Post New Answer View All Answers
What is difference between datalist and gridview?
ASP.NET 2.0's new membership API used for creating and managing user account is exposed through which 2 clause?
Explain the difference between overriding and overloading?
Describe how ASP.NET maintains process isolation for each Web application?
What is routing in MVC?
What is the difference between response.redirect and server.transfer?
What is the use of session in web application?
What is the file extension of web service?
Explain the flow of processing of the request? : asp.net mvc
9. Why should we hire you over the others waiting to be interviewed?
Are cookies client side or server side?
What is the significance of ASP.NET routing?
What is meant by asp.net?
What are the modes of updation in an updatepanel?
How to comment out asp.net tags?