Top25 ASP.NET Interview Questions - FAQ | Crack the Interview Easily


Complete MicrosoftDot Net Topics – PDF Download


1. What is ASP.Net?

It is a framework developed by Microsoft on which we can develop new generation web sites using web forms(aspx), MVC, HTML, Javascript, CSS etc. Its successor of Microsoft Active Server Pages(ASP). Currently there is ASP.NET 4.0, which is used to develop web sites. There are various page extensions provided by Microsoft that are being used for web site development. Eg: aspx, asmx, ascx, ashx, cs, vb, html, XML etc.

2. What’s the use of Response.Output.Write()?

 We can write formatted output  using Response.Output.Write().

3. What is caching?

Caching is a technique used to increase performance by keeping frequently accessed data or files in memory. The request for a cached file/data will be accessed from cache instead of actual location of that file.

4. What is Cross Page Posting?

When we click submit button on a web page, the page post the data to the same page. The technique in which we post the data to different pages is called Cross Page posting. This can be achieved by setting POSTBACKURL property of  the button that causes the postback. Findcontrol method of PreviousPage can be used to get the posted values on the page to which the page has been posted.

5. What is RedirectPermanent in ASP.Net?

  RedirectPermanent Performs a permanent redirection from the requested URL to the specified URL. Once the redirection is done, it also returns 301 Moved Permanently responses.

6. What are the advantages of the code-behind feature?


The code-behind feature of ASP.NET offers a number of advantages:
Makes code easy to understand and debug by separating application logic from HTML tags
Provides the isolation of effort between graphic designers and software engineers
Removes the problems of browser incompatibility by providing code files to exist on the Web server and supporting Web pages to be compiled on demand.

7. What is an ASP.NET Web Form?

ASP.NET Web forms are designed to use controls and features that are almost as powerful as the ones used with Windows forms, and so they are called as Web forms. The Web form uses a server-side object model that allows you to create functional controls, which are executed on the server and are rendered as HTML on the client. The attribute, runat="server", associated with a server control indicates that the Web form must be processed on the server.

8. What is IIS? Why is it used?

Internet Information Services (IIS) is created by Microsoft to provide Internet-based services to ASP.NET Web applications. It makes your computer to work as a Web server and provides the functionality to develop and deploy Web applications on the server. IIS handles the request and response cycle on the Web server. It also offers the services of SMTP and FrontPage server extensions. The SMTP is used to send emails and use FrontPage server extensions to get the dynamic features of IIS, such as form handler.

9. What is Query String? What are its advantages and limitations?

The Query String helps in sending the page information to the server.

The Query String has the following advantages:

Every browser works with Query Strings.
It does not require server resources and so does not exert any kind of burden on the server.
The following are the limitations of Query String:

Information must be within the limit because URL does not support many characters.
Information is clearly visible to the user, which leads to security threats.

10. What is the difference between authentication and authorization?

Authentication verifies the identity of a user and authorization is a process where you can check whether or not the identity has access rights to the system. In other words, you can say that authentication is a procedure of getting some credentials from the users and verify the user's identity against those credentials. Authorization is a procedure of granting access of particular resources to an authenticated user. You should note that authentication always takes place before authorization.

Quick Links:



11. Differentiate globalization and localization.

The globalization is a technique to identify the specific part of a Web application that is different for different languages and make separate that portion from the core of the Web application. The localization is a procedure of configuring a Web application to be supported for a specific language or locale.

12. What is a Cookie? Where is it used in ASP.NET?

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.

13. What is the default timeout for a Cookie?

The default time duration for a Cookie is 30 minutes.

14. How does a content page differ from a master page?

A content page does not have complete HTML source code; whereas a master page has complete HTML source code inside its source file.

15. Explain how Cookies work. Give an example of Cookie abuse.

The server tells the browser to put some files in a cookie, and the client then sends all the cookies for the domain in each request. An example of cookie abuse is large cookies affecting the network traffic.

16. What are Custom User Controls in ASP.NET?

The custom user controls are the controls that are defined by developers. These controls are a mixture of custom behavior and predefined behavior. These controls work similar to other Web server controls.

17. What do you understand by aggregate dependency?

Aggregate dependency allows multiple dependencies to be aggregated for content that depends on more than one resource. In such type of dependency, you need to depend on the sum of all the defined dependencies to remove a data item from the cache.

18. How can you dynamically add user controls to a page?

User controls can be dynamically loaded by adding a Web User Control page in the application and adding the control on this page.

19. What type of code, client-side or server-side, is found in a code-behind file of a Web page?

A code-behind file contains the server-side code, which means that the code contained in a code-behind file is executed at the server.

20. What is Role-based security?

In the Role-based security, you can assign a role to every user and grant the privilege according to that role. A role is a group of principal that restricts a user's privileges. Therefore, all the organization and applications use role-based security model to determine whether a user has enough privileges to perform a requested task.


Best Dot NetTraining Institute in Chennai


21. What is the use of PlaceHolder control? Can we see it at runtime?

The PlaceHolder control acts as a container for those controls that are dynamically generated at runtime. We cannot see it at runtime because it does not produce any visible output. It used only as a container.

22. How can you enable impersonation in the web.config file?

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" />

23. Which method has been introduced in ASP.NET 4.0 to redirect a page permanently?

The RedirectPermanent() method added in ASP.NET 4.0 to redirect a page permanently. The following code snippet is an example of the RedirectPermanent() method:
RedirectPermanent("/path/Aboutus.aspx");

24. What is ViewState?

The ViewState is a feature used by ASP.NET Web page to store the value of a page and its controls just before posting the page. Once the page is posted, the first task by the page processing is to restore the ViewState to get the values of the controls.

25. Why do you use the App_Code folder in ASP.NET?

The App_Code folder is automatically present in the project. It stores the files, such as classes, typed data set, text files, and reports. If this folder is not available in the application, you can add this folder. One of the important features of the App_Code folder is that only one dll is created for the complete folder, irrespective of how many files it contains.


Latest Dot NetDeveloper Jobs









Comments

Popular posts from this blog

Top 100 Microsoft Dot Net Interview Questions with Answers

Important Tools For Dot NET Development