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
Can anyone please tell me that the question posted on this website are Sufficient for the interview with 2+ year experience in .net
What types of data validation events are commonly seen in the client-side form validation?
Explain how cookies work.
Explain the difference between asp & asp.net.
What are the new features added from ASP to ASP.NET?
Define transparent caching with aop?
witch is the best insistute in sharpoint course.what abt future of share point course.
What are the features of asp net?
What kind of programming language is ASP.NET?
What are the session variables?
What kind of data we can store in viewstate?
Mention few asp.net validators.
What is asp.net master page?
Is asp.net different from asp? If yes, explain how?
Explain the asp.net mvc folder conventions? : asp.net mvc