ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  ASP.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
which method marks a config file section for encryption?
 Question Submitted By :: Ynpradeep
I also faced this Question!!     Rank Answer Posted By  
 
  Re: which method marks a config file section for encryption?
Answer
# 1
protected void Page_Load(object sender, EventArgs e) {
Configuration config;
ConfigurationSection configSection;
config = WebConfigurationManager.OpenWebConfiguration
(Request.ApplicationPath);
configSection = config.GetSection("connectionStrings");
if (configSection != null) {
if (!(configSection.SectionInformation.IsLocked)) {
configSection.SectionInformation.ProtectSection("
DataProtectionConfigurationProvider");
config.Save();
} } }


To unprotect :

Public Sub Page_Load()
Dim config As Configuration
Dim configSection As ConfigurationSection
config = WebConfigurationManager.OpenWebConfiguration
(Request.ApplicationPath)
configSection = config.GetSection("connectionStrings")
If Not (configSection Is Nothing) Then
If Not (configSection.SectionInformation.IsLocked) Then
configSection.SectionInformation.UnprotectSection()
config.Save()
End If
End If
End Sub
 
Is This Answer Correct ?    1 Yes 0 No
Guest
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
Difference between asp and asp.net ? Accenture3
what is dumpbin.exe?  1
how to pass session value one url to another url.my code if session("user")="abc" then response.redirect("www.abc.com\client\home.aspx") end if. so how to pass value of session in browser url  1
Does C# support static class?Is Static class be inherited by any class?  2
What are runtime hosts? Microsoft3
What is the Global.asax used for?  3
How Web Service help? What is the difference between Remoting & Web Servcies?  2
How do you a replicate a set of controls across a number of ASP Pages  2
What is Boxing and Unboxing? Accenture6
How does SQL Server session state works Emphasis1
What is Stateless ASP or ASP.Net? Accenture2
Can you explain what inheritance is and an example of when you might use it?  1
What object is used to encapsulate a rowset? a) DataSet b) DataAdapter c) DataRowSet d) DataTable Syntax-Softtech2
can u create two Primary key for a table? --Sivaa BirlaSoft8
what is CLR? PrimeLine3
What are the new page events added in Asp.net 2.0 ? Sapient5
accessing a textbox that was created dynamically? for (int i = 0; i < t1; i++) { TextBox t2 = new TextBox(); t2.ID = "adf" + i; PlaceHolder1.Controls.Add(t2); } accessing data entered in the above created controls.  1
Should validation (did the user enter a real date) occur server-side or client-side? Why?  2
What combination of methods are used to improve the speed of the fill() method of the DataAdapter? a) BeginFillData() and EndFillData() b) StartFillData() and EndFillData() c) BeginLoadData() and EndLoadData() d) StartLoadData() and EndLoadData() Syntax-Softtech2
What is the base class of .NET?  5
 
For more ASP.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com