April 30, 2013

ASP.NET Interview Questions and Answers

What setting must be added in the configuration file to deny a particular user from accessing the secured resources?
Ans- To deny a particular user form accessing the secured resources, the web.config file must contain the following code:

<authorization >
<deny users="username" />
</authorization>


 What is the difference between page-level caching
and fragment caching?
Ans- In the page-level caching, an entire Web page is cached; whereas, in the fragment caching, a part of the Web page, such as a user control added to the Web page, is cached.


 How can you assign page specific attributes in an ASP.NET application?
Ans- The @Page directive is responsible for this.

 What is a Cookie? Where is it used in ASP.NET?
Ans- Cookie is a lightweight executable program, which the server posts to client machines. Cookies store the identity of a user at the first visit of the Web site and validate them later on the next visits for their authenticity. The values of a cookie can be transferred between the user's request and the server's response.

What does the .WebPart file do?
Ans- The .WebPart file explains the settings of a Web Parts control that can be included to a specified zone on a Web page.
 
What are the event handlers that can be included in the Global.asax file?
Ans- The Global.asax file contains some of the following important event handlers:

  • Application_Error
  • Application_Start
  • Application_End
  • Session_Start
  • Session_End 

How can you enable impersonation in the web.config file?
Ans- To enable impersonation in the web.confing file, you need to include the <identity> element in the web.config file and set the impersonate attribute to true as shown in the following code snippet:
<identity impersonate = "true" />

0 comments:

Post a Comment

  • Blogger news

    This Blog Contains All Topics Related To Internet, Website Help, Interview Questions, News, Results From Various Resources, Visit Daily For More Interesting And Famous Topics.
  • Random Post

  • About

    We Provide All Information Which you Needed. We Maintain This Blog Very Carefully, If You Find Any Mistake or Any Suggestions Then Please Let Us Know, You Can Contact Us By Comments, On FB Page Or On Google+ Page. ~ Thank You