20 ASP.Net Interview Questions & Answers

20 ASP.Net Interview Questions & Answers

The Questions That Need to be Prepared for Being Successful in Asp.Net Interview

You must have prepared for various interviews but being prepared for asp.net interview is a bit different. When you prepare for interviews you must have seen that you are asked questions on subjects even if you tell that you are not experienced. For being successful in such interview you must be prepared for the inevitable. It is better to develop your programming skills and be aware of the recent developments that have happened in the field of asp.net. There are certain asp.net interview questions which are sure to be asked in such interviews. We will be discussing such questions over here so that you remain prepare with those. As I told earlier to be prepared for such technical interviews you need to be prepared for some other things too except being prepared with the subject matter. The things that will make you shine while seating at the hot seat are that you should answer the questions that you know confidently. It is much better to confess that you do not know the answer to a certain question than to answer it wrong. You must be ready to write the codes if you are asked to do so. You must have the capability to explain the project that you are about to undertake. Try not to argue with the interviewer. You may think that an explanation given by them is not right it is better to avoid than to argue. You must be prepared to answer the How and Why questions. There must be some achievements which you have made, explain that to the interview in order to impress them. These are certain things that you must make yourself prepared along with the questions that we discuss below.

What is ASP.NET?

This may be the first amongst the asp.net interview questions that you are asked. The answer is pretty simple. We all know the answer to this question. But it is always well to be prepared with the basic questions because that is where we generally make mistakes and fail to reflect how knowledgeable we are about the subject upon which we are seating for the interview. The answer to this question is that:

  • NET is a technology which is on the server side and is a programming approach which is object-oriented. The elements that are used in asp.net is treated as an object and they run on the server.
  • It is a technology which allows one to use programming languages like C-Sharp; VB.NET and they can be used to build web applications easily.

Another reason for being prepared with these basic questions is that we will know exactly for to organize the answer so that the interviewer can understand our depth of knowledge.

What is CLR?

It is that which effectively handles the difficulty and implementation of .NET programs. It uses JIT and complies with the IL code to make other codes which can be executed. The responsibilities that are undertaken by CLR are:

  • Garbage Collection
  • Code Verification
  • Code Access Security
  • Intermediate language -to-native translators and optimizer’s

Explain the difference between Assemblies and Namespace?

Namespaces are the compartments for holding the classes. In Object-Oriented world, it is conceivable that developers will utilize a similar class name. By utilizing namespace alongside class name this impact can be evacuated.

  • An assembly exists as a .DLL or .EXE that contains MSIL code that is executed by CLR.
  • An assembly contains interface and classes and it can likewise contain different assets like documents, bitmaps and so on.

Describe the events that take place in the life cycle of a web application?

This may be the next question that you are asked from the asp.net interview questions. The answer to this question is that: The inception of a web application happens when a browser requests a page of the application. This request is taken up by the IIS and it initiates the working of ASP.NET. The process then makes available a process space to the assembly and then it is loaded. The event Application_Start() will initiate the start of the application and it is then followed by the Session_Start().  The engine of the ASP.NET then start processing the request that is received and sends a response in the form of HTML to the one who sends the request and the user receives it as a page.

What is an application event handler in ASP.NET?

The below mentioned are the application event handler in the sequence of the execution that is made:

  • Application_Start – It is fired when the first customer visits a page of the application or there is a request from the user to the server.
  • Application_End – It is fired when it is seen that no more users of the application.
  • Application_BeginRequest – It is used at the starting of every request that is made to the server.
  • Application_EndRequest – It is used at the end of every request that is made to the server.
  • Session_Start – It is used when an instance of new visit occurs.
  • Session_End – It is used when the user does not request any more page and the session is timed out.

Explain what you know about Web Form Events?

The answer to this question is also simple but practice is required so that we remember all of them and can mention them when asked. The web form events if listed in the order of their execution sequence are:

  • Page_Init
  • Page_Load
  • Page_PreRender
  • Page_Unload
  • Page_Disposed
  • Page_Error
  • Page_AbortTransaction
  • Page_CommitTransaction
  • Page_DataBinding

The answers may be looking to be simple and you may be thinking why to prepare these asp.net interview questions. In order to remove your confusion, it is good to say that these are the questions which are asked to gauge your depth of knowledge about asp.net and there should not be any flaw in answering them. So, it is prudent to organize your known answer in a manner where you can impress your interviewer the most.

What do you understand by Global Assembly Cache?

Global Assembly Cache is one which is used for sharing the assemblies of .NET. It can be used in the below mentioned cases:

  • If it is seen that there are multiple application which intends to use the same assembly.
  • If there is a requirement of security for the assembly. Such as in the case when only administrators have the right for removing an assembly.

Explain what do you understand by Server Controlled Events in ASP.NET?

There are various server controls like Textbox, Button Dropdown list and much more that are offered by asp.net. By the usage of events and mechanism of event handler, each of these controls will respond to the action that the user wants. Below are some of the server controlled events:

  • Postback Events: By utilization of this event a web page is sent to the server for the required processing that is required. As the processing is completed the web page will be sending the data back to the same page that is on the server.
  • Cached Events: These are special nature of events which take place when there is an occurrence of postback events.

What do you understand by Strong Names?

These are special types of names which are unique given to assemblies. These names are similar in nature as GUID that is used in COM components. If there is a requirement for deployment of assemblies in GAC then Strong Names should be given to assemblies. The usage of these names helps GAC to have the required differentiation between two versions.

How do you generate Strong Names?

For the creation of Strong Names you need to go to the Visual Studio Command Prompt. Over there you need to type “sn.exe.-k”D:\TestingStrongName.snk”. The SNK file will be produced and you can name the project using this file. You need to go to the properties of the project and search for SNK file that is generated and you can build the project.

So, until now what are you feeling about the preparation that you are having about the asp.net interview through these asp.net interview questions. Read through these questions time and again so that you can properly understand how to organize the answer in the best possible manner and explain to the interviewer your knowledge base about the subject. Start your preparations earlier so that you can understand the answers and keep those in mind. It is not necessary to memorize the answers but it is good to read through them so that you reach a position where you can recollect the answer when that question is asked.

Explain the State Management options in ASP.NET?

There are basically two types of State Management options in ASP.NET. They are State Management on the Client side and those which are on the Server side.

  • Client-Side State Management: This keeps up data on the customer’s machine utilizing both of the accompanying alternatives –

Cookies- Cookie is a little estimated text file on the customer machine either in the customer’s document framework or memory of customer browser session.

View State – Every page and control on the used page has View State property. This permits programmed maintenance of page and control’s state between each excursion to a server.

Query string – Query strings can keep up restricted state data. Information has been passed starting with one page then onto the next with the URL, yet you can send the restricted size of information with the URL.

  • Server-Side Management: This mechanism is required for retention of state on the server. Below are some means of obtaining that-

Application State: The data that is stored in the objects of an application can be shared by the various sessions that are used by the application.

Session State: In this state information which are session specific are stored and this information can be viewed within the session only.

What do you understand by Garbage Collection in ASP.NET?

It is a feature of the CLR and it is used for automatic management of memory. By this feature, the objects are released automatically when they are not used or referred to.  Below are the methods which are used for this feature to function properly.

  • Collect()
  • Dispose()
  • Finalize()

What do you know about the different caching using cache objects in ASP.NET?

There are two types of caching which we can use for outputting cache information which is to be transmitted to and required display in the web browser:

  • Page Output Caching
  • Page Fragment Caching

Tell about the settings which can be done in the Web.config file in .NET?

The settings that we can have in web.config are:

  • Connection String of the database.
  • Error Page setting.
  • Culture specific setting.
  • Session States.
  • WCF Binding and endpoint details.
  • Error Handling

Tell us about the sequence in which events in ASP.NET are processed?

The sequence that is followed for processing events in ASP.Net is:

  • Page_Init
  • Page_Load
  • Control events
  • Page_Unload

Explain the difference between Authentication and Authorization?

Authentication is the procedure in which we are checking the personality of the client to permit the client into the application. So Login is the procedure of authentication for the application. Presently online networking authentication is likewise permitted in numerous sites to recognize the client.

Authorization sounds same as authentication yet it is distinctive. Authorization handles the consent stuff for the client at a page level. A better illustration will be if the client is authorized in the site does not imply that client has full consent on every one of the pages so that can be controlled by authorization.

So, we see that the asp.net interview questions can be of different nature. We must be prepared for all such questions. It should not be the case that we cannot answer basic questions and fail to impress the interviewer. The interviewer should at no point think that we are not certain about the answer that we are giving. If we cannot recollect any answer then it is good to confess than to give a wrong answer.

Tell about the various modes of authentication means that are available in ASP.NET?

If we see then there are basically three types of authentication that are available in ASP.NET. They are:

  • Windows Authentication: In this nature of authentication the credentials that are there in our system is used for the purpose of providing authentication.
  • Forms Authentication: This is a nature of authentication which is Form based. The control for Login in ASP.NET is this nature of authentication.
  • Passport Authentication: This nature of authentication allows one to use the passport service of Microsoft for providing authentication to the user using the application of yours.

What do you understand by impersonation in ASP.NET?

ASP.NET executes in the security setting of a limited client account on the neighbourhood machine. Now and then, we have to get to network assets, for example, a record on a mutual drive, which will require extra authorizations. One approach to limit this is to utilize impersonation. ASP.NET with impersonation can execute the demand utilizing the character of the customer or ASP.NET can mimic a particular record by the qualities in web.config.

What is Custom Control in ASP.NET?

These are codes which are compiled which are easier to use but difficult to create one. As the control is created it can be added to the Toolbox and can be displayed as a design aspect.

As we are getting ready for the meeting of a technological subject there are sure different arrangements likewise to be made alongside getting readied for the asp.net interview questions. The post will be the one which will be a managerial one with high obligation. These nature of yours relating to assuming liability will likewise be judged while in the meeting. Have the obligation to be in the setting of the meeting in time. It must not be with the goal that you arrive at the spot after you name having been called for. It is ideal to be right on time than to be late. Have the best clothing that you can have and be dressed like an expert. You should resemble a researcher dislike a normal agent when you go for the interview. Take out time so you can get ready well with the inquiries that have been gathered here. Do, not situate with them the day preceding the meeting. Begin to get ready for the meeting from the time you decide to appear for the meeting. Comprehend the inquiries legitimately before replying. The questioner may play with words to confuse you so be aware of that. On the off chance that there is perplexity clear that before you endeavour the question. It is ideal to clear the perplexity then answer than to give a wrong answer. A wrong answer may ruin your whole exertion while getting it illuminated will demonstrate the questioner how wary you are the point at which you have to accomplish something.

Leave a Reply

Close Menu