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
6. Tell us about a time when you failed to meet a deadline. What were the repercussions?
What are the asp.net 2.0 features?
What are url fragments?
Do session use cookies in asp net?
What is difference between inproc and outproc?
What are the page life cycle events?
Can you explain one critical mapping? Performance issue which one is better? Whether connected lookup tranformation or unconnected one?
What are the different authentication modes in asp.net?
Does google crawl redirects?
What is the use of session?
How information about the user's locale can be accessed?
What I need to create and run an asp.net application?
What are the different types of proxy patterns?
What is form method?
Why session is necessary in web application?