Interview Questions for 3-6 years experienced .Net professional
I have tried to reproduce the frequently asked questions for .Net professionals between 3 to 6 years experienced. The set of questions is put forward as a result of interaction with friends and colleagues who attended interviews in CMM-i Level 5 organisations.
CLR and C#
1. Types of Authentication and Authorisation in IIS.
2. Types of Authentication and Authorisation in ASP.Net.
3. ASP.Net Life cycle.
4. Page Life Cycle.
5. What are types: Value Type and Reference Type?
6. Boxing and Unboxing: Terminology, Advantages and Disadvantages.
7. What is Type Safety?
8. What is Strong Name?
9. What are Extensions, modules and handlers?
10. What is worker process?
11. CLR and DLR?
12. In case more than one version of an installable is installed, which version is invoked by default?
13. What are Globalisation and localisation? How to implement them?
14. What is assembly, GAC? Where they are physically located?
15. How to configure HTTPS for a web application?
16. What are in-proc and out-proc? Where are data stored in these cases?
17. When the View state is saved, and when is it loaded? How to enable/ disable View states?
18. Difference between GET and POST. Which one is more secure?
19. What are Razor engines? How is it diff from ASP Engines?
20. Pros and cons of JavaScript and AJAX.
21. In how many different ways can JavaScript be used/called in an application?
22. What needs to be done to call a JavaScript function from code behind?
23. Difference between Server Controls and User controls?
24. Difference between Var, object and Dynamic types.
25. Difference between Functions and methods.
26. Difference between Abstract classes and Interface. Explain with scenario where to implement one?
27. Different forms of Polymorphism. Differences between Abstraction and Polymorphism.
28. What are Delegates and Events.
29. Covariance and Contravariance.
30. What are Extension methods.
31. What are Anonymous methods and Lambda Expression.
32. Multithreading. How to implement Multithreading?
33. Which interface is used to
a. Convert Boolean values to Visibility values?
b. Compare two integer values?
c. Compare String values?
SQL Server
34. What is the difference between a View and a Cursor?
35. How to execute multiple update on different conditions in a single query?
36. Left outer joins and Right Outer joins
37. Exception handling.
38. What is Performance Tuning? How do you implement it.
39. Difference between Having and where clauses.
40. Difference between Temp tables and Tables variables?
41. What does @ and @@ suffixed by property names specify?
42. Self-join queries.
43. Types of Index.
44. Difference between Primary key , Unique key and Candidate key?
45. What is the default value for Date type. What are Min and Max values for Date in 2008.
WCF
46. What is WCF also known as?
47. Difference between WCF and Web Services?
48. What are Endpoints?
49. What are Behaviour and Bindings?
50. What are different types of Contracts supported?
51. What is the difference between Transport and Message Security mode?
52. How to configure WCF security to support Windows authentication?
53. How to use Fault Contract?
WPF
54. Diff between XML and XAML.
55. Stack Panel and Wrap Panel.
56. Hierarchical Data Template.
57. Virtualisation.
58. Events and Routed Events.
59. Bubbling and Tunnelling.
60. Resource Dictionary, Static Resources and Dynamic Resources.
61. What is Prism?
62. Dependency Injection, Event Aggregator.
63. Shell, Bootstrapper and Region Managers.
64. What are MEF and Unity?
65. How to navigate to another page?
Hai Rohit,
Thanks for posting the short questions for 3-6 years guys. These questions will be helpful for those who are preparing for the interview or attending the interviews. This will be helpful for the last minute preparation in quickest way.
Below I am trying to provide the answers for these questions. If anyone has better answer, please reply to this post as that will be useful for all of us.
As the system is not allowing me to keep all the answers as in one post so I am dividing the questions and posting them in continuous posts.
CLR and C#
1. Types of Authentication and Authorization in IIS.
A. Types of Authentication: Anonymous Authentication, Windows Authentication, Digest Authentication
Types of Authorization:- Anonymous
2. Types of Authentication and Authorization in ASP.Net.
A. Types of Authentication: Windows Authentication, Forms Authentication
Types of Authorization:- File Authorization and URL Authorization
3. ASP.Net Life cycle.
A. The request starts with the client and processed through IIS. In IIS, there are 2 utilities- INetInfo.exe and ASPNet_ISAPI.dll the InetInfo.exe checks for the syntax and semantics of the request and then the request goes to the ASPNet_ISAPI.dll which is the filter to filter the .aspx files. Here the URL request split in to 2 parts- virtual directory and webpage. Now worker process which is nothing but the application factory basically contains all the virtual directories and checks for the current virtual directory. If this is first request, then there will be no Virtual directory available. Now the worker process (W3wp.exe) creates a memory area called as AppDomain to check for the current page. As AppDomain is the Page Handler factory so it contains all the processes pages. If this is the new page then it will not find here. The request further move to the HttpPipeline where the actual execution of the page happened by using the ProcessRequest method and creates the events of the page. After creation of event and execution of all the event, the html page gets back to the user.
4. Page Life Cycle.
A. There are few events which gets generated during the page execution like: Page_BeginRequest, Page_Init, Page_Load, Page_Prerender, Page_Render, Page_Unload etc
For the details of the page life cycle, you can follow the previous question.
5. What are types: Value Type and Reference Type?
A. Value type holds data directly, Value type stored in the stack memory, We can get the direct value of the value types. Value type data type can't be null.
Reference types: This type doesn't hold the data directly. They hold the address on which the actual data present. They stored in heap memory, Can have default values.
We can make and work with null reference type.
6. Boxing and Unboxing: Terminology, Advantages and Disadvantages.
A. Converting the value type data type in to the Reference type is called as Boxing. Converting the Reference type data type and keep its value to stack is called as the reference type.
byte b= 45;
Object o = b.Tostring();
The Advantage of boxing and unboxing is that we can convert the type of the object in to another type. The disadvantage is that it requires lot of memory and CPU cycles to convert from one type to another type.
Object o=10;
Int i= Convert.ToInt32(o.ToString());
7. What is Type Safety?
A. TypeSafe is a way through which the application or framework that the memory will not be leaked to outside environment. E.g. C# is the type safe language where you must have to assign any object before using it. In VB.Net it will take the default value. So C# is the type safe language while VB.Net is not.
8. What is Strong Name?
A. Strong Name (SN) is used to make the dll as the unique as:
SN -k fileName.dll
Now it will have the unique name. This assembly when placed in the GAC, it will treat as the unique with its version number and other details. 2 assemblies with the same name can exist in the GAC but both will have different version. The CLR takes the latest version assembly while running the application.
9. What are Extensions, modules and handlers?
A. HttpModule and HttpHandler are the utilities which are used in the HttpPipeline under the ASP.Net page life cycle. When the request received to HttpPipeline, the HttpModule checks for the Authentication of the request and then it route the request to the respective handler. After that HttpHandler takes that request and process it. After Processing the request again the HttpModule takes the response and send it back to the worker process and finally to the user.
10. What is worker process?
A. Worker process (w3wp.exe) is an executable which is also called as the Application Factory. This is used for the execution of the request and handling of the request for the current web page.
cont...