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
Is asp.net a programming language?
Name some asp objects?
What are the differences between code behind and code inline?
How response object is related to asp's response object?
How can we inherit a static member?
Explain the use of duration attribute of @outputcache page directive.
How is my content secured from unauthorized access?
Can you explain page lifecycle in net?
Differentiate between authentication and authorization.
What are resource file and how do we generate resource file?
Difference between application events and session events
What is the life cycle of an asp.net page?
How could you modify xaml content from javascript?
What is bound controls
Where session id is stored?