Friday 27 July 2012

ASP.NET Interview Questions

  1. From constructor to destructor (taking into consideration Dispose() and the concept of non-deterministic finalization), what the are events fired as part of the ASP.NET System.Web.UI.Page lifecycle. Why are they important? What interesting things can you do at each?
  2. What are ASHX files?  What are HttpHandlers?  Where can they be configured?
  3. What is needed to configure a new extension for use in ASP.NET? For example, what if I wanted my system to serve ASPX files with a *.jsp extension?
  4. What events fire when binding data to a data grid? What are they good for?
  5. Explain how PostBacks work, on both the client-side and server-side. How do I chain my own JavaScript into the client side without losing PostBack functionality?
  6. How does ViewState work and why is it either useful or evil?
  7. What is the OO relationship between an ASPX page and its CS/VB code behind file in ASP.NET 1.1? in 2.0?
  8. What happens from the point an HTTP request is received on a TCP/IP port up until the Page fires the On_Load event?
  9. How does IIS communicate at runtime with ASP.NET?  Where is ASP.NET at runtime in IIS5? IIS6?
  10. What is an assembly binding redirect? Where are the places an administrator or developer can affect how assembly binding policy is applied?
  11. Compare and contrast LoadLibrary(), CoCreateInstance(), CreateObject() and Assembly.Load().
  12. Describe the difference between a Thread and a Process?
  13. What is a Windows Service and how does its lifecycle differ from a "standard" EXE?
  14. What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
  15. What is the difference between an EXE and a DLL?
  16. What is strong-typing versus weak-typing? Which is preferred? Why?
  17. Corillian's product is a "Component Container." Name at least 3 component containers that ship now with the Windows Server Family.
  18. What is a PID? How is it useful when troubleshooting a system?
  19. How many processes can listen on a single TCP/IP port?
  20. What is the GAC? What problem does it solve?
  21. Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming.
  22. Describe what an Interface is and how it’s different from a Class.
  23. What is Reflection?
  24. What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?
  25. Are the type system represented by XmlSchema and the CLS isomorphic?
  26. Conceptually, what is the difference between early-binding and late-binding?
  27. Is using Assembly.Load a static reference or dynamic reference?
  28. When would using Assembly.LoadFrom or Assembly.LoadFile be appropriate?
  29. What is an Asssembly Qualified Name? Is it a filename? How is it different?
  30. Is this valid? Assembly.Load("foo.dll");
  31. How is a strongly-named assembly different from one that isn’t strongly-named?
  32. Can DateTimes be null?
  33. What is the JIT? What is NGEN? What are limitations and benefits of each?
  34. How does the generational garbage collector in the .NET CLR manage object lifetime? 
  35. What is non-deterministic finalization?
  36. What is the difference between Finalize() and Dispose()?
  37. How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?
  38. What does this useful command line do? tasklist /m "mscor*"
  39. What is the difference between in-proc and out-of-proc?
  40. What technology enables out-of-proc communication in .NET?
  41. When you’re running a component within ASP.NET, what process is it running within on Windows XP? Windows 2000? Windows 2003? Windows 7? Windows 2008?
  42. What’s wrong with a line like this? DateTime.Parse(myString);
  43. What are PDBs? Where must they be located for debugging to work?
  44. What is cyclomatic complexity and why is it important?
  45. Write a standard lock() plus “double check” to create a critical section around a variable access.
  46. What is FullTrust? Do GAC’ed assemblies have FullTrust?
  47. What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
  48. What does this do? gacutil /l | find /i "Corillian"
  49. What does this do? sn -t foo.dll
  50. What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
  51. Contrast OOP and SOA. What are tenets of each?
  52. How does the XmlSerializer work? What ACL permissions does a process using it require?
  53. Why is catch(Exception) almost always a bad idea?
  54. What is the difference between Debug.Write and Trace.Write? When should each be used?
  55. What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
  56. Does JITting occur per-assembly or per-method? How does this affect the working set?
  57. Contrast the use of an abstract base class against an interface?
  58. What is the difference between a.Equals(b) and a == b?
  59. In the context of a comparison, what is object identity versus object equivalence?
  60. How would one do a deep copy in .NET?
  61. Explain current thinking around IClonable.
  62. What is boxing?
  63. Is string a value type or a reference type?
  64. What is the significance of the "PropertySpecified" pattern used by the XmlSerializer? What problem does it attempt to solve?
  65. Why are out parameters a bad idea in .NET? Are they?
  66. Can attributes be placed on specific parameters to a method? Why is this useful?
  67. Juxtapose the use of override with new. What is shadowing?
  68. Explain the use of virtual, sealed, override, and abstract.
  69. Explain the importance and use of each component of this string: Foo.Bar, Version=2.0.205.0, Culture=neutral, PublicKeyToken=593777ae2d274679d
  70. Explain the differences between public, protected, private and internal.
  71. What benefit do you get from using a Primary Interop Assembly (PIA)?
  72. By what mechanism does NUnit know what methods to test?
  73. What is the difference between: catch(Exception e){throw e;} and catch(Exception e){throw;}
  74. What is the difference between typeof(foo) and myFoo.GetType()?
  75. Explain what’s happening in the first constructor: public class c{ public c(string a) : this() {;}; public c() {;} } How is this construct useful?
  76. What is this? Can this be used within a static method?
  77. Describe how a browser-based Form POST becomes a Server-Side event like Button1_OnClick.
  78. What is a PostBack?
  79. What is ViewState? How is it encoded? Is it encrypted? Who uses ViewState?
  80. What is the <machinekey> element and what two ASP.NET technologies is it used for?
  81. What three Session State providers are available in ASP.NET 1.1? What are the pros and cons of each?
  82. What is Web Gardening? How would using it affect a design?
  83. Given one ASP.NET application, how many application objects does it have on a single proc box? A dual? A dual with Web Gardening enabled? How would this affect a design?
  84. Are threads reused in ASP.NET between reqeusts? Does every HttpRequest get its own thread? Should you use Thread Local storage with ASP.NET?
  85. Is the [ThreadStatic] attribute useful in ASP.NET? Are there side effects? Good or bad?
  86. Give an example of how using an HttpHandler could simplify an existing design that serves Check Images from an .aspx page.
  87. What kinds of events can an HttpModule subscribe to? What influence can they have on an implementation? What can be done without recompiling the ASP.NET Application?
  88. Describe ways to present an arbitrary endpoint (URL) and route requests to that endpoint to ASP.NET.
  89. Explain how cookies work. Give an example of Cookie abuse.
  90. Explain the importance of HttpRequest.ValidateInput()?
  91. What kind of data is passed via HTTP Headers?
  92. Juxtapose the HTTP verbs GET and POST. What is HEAD?
  93. Name and describe at least a half dozen HTTP Status Codes and what they express to the requesting client.
  94. How does if-not-modified-since work? How can it be programmatically implemented with ASP.NET?
  95. Explain <@OutputCache%> and the usage of VaryByParam, VaryByHeader.
  96. How does VaryByCustom work?
  97. How would one implement ASP.NET HTML output caching, caching outgoing versions of pages generated via all values of q= except where q=5 (as in http://localhost/page.aspx?q=5)?
  98. What is the purpose of XML Namespaces?
  99. When is the DOM appropriate for use? When is it not? Are there size limitations?
  100. What is the WS-I Basic Profile and why is it important?
  101. Write a small XML document that uses a default namespace and a qualified (prefixed) namespace. Include elements from both namespace.
  102. What is the one fundamental difference between Elements and Attributes?
  103. What is the difference between Well-Formed XML and Valid XML?
  104. How would you validate XML using .NET?
  105. Why is this almost always a bad idea? When is it a good idea? myXmlDocument.SelectNodes("//mynode");
  106. Describe the difference between pull-style parsers (XmlReader) and eventing-readers (Sax)
  107. What is the difference between XPathDocument and XmlDocument? Describe situations where one should be used over the other.
  108. What is the difference between an XML "Fragment" and an XML "Document."
  109. What does it meant to say “the canonical” form of XML?
  110. Why is the XML InfoSet specification different from the Xml DOM? What does the InfoSet attempt to solve?
  111. Contrast DTDs versus XSDs. What are their similarities and differences? Which is preferred and why?
  112. Does System.Xml support DTDs? How?
  113. Can any XML Schema be represented as an object graph? Vice versa?
  114. What is SOLID?
  115. Why is the Single Responsibility Principle important?
  116. What is Inversion of Control? How does that relate to dependency injection?
  117. How does a 3 tier application differ from a 2 tier one?
  118. Why are interfaces important?
  119. What is the Repository pattern? The Factory Pattern? Why are patterns important?
  120. What are some examples of anti-patterns?
  121. Who are the Gang of Four? Why should you care?
  122. How do the MVP, MVC, and MVVM patterns relate? When are they appropriate?
  123. Explain the concept of Separation of Concerns and it's pros and cons.
  124. Name three primary attributes of object-oriented design. Describe what they mean and why they're important.
  125. Describe a pattern that is NOT the Factory Pattern? How is it used and when?
  126. You have just been put in charge of a legacy code project with maintainability problems. What kind of things would you look to improve to get the project on a stable footing?
  127. Show me a portfolio of all the applications you worked on, and tell me how you contributed to design them.
  128. What are some alternate ways to store data other than a relational database? Why would you do that, and what are the trade-offs?
  129. Explain the concept of convention over configuration, and talk about an example of convention over configuration you have seen in the wild.
  130. Explain the differences between stateless and stateful systems, and impacts of state on parallelism.
  131. Discuss the differences between Mocks and Stubs/Fakes and where you might use them (answers aren't that important here, just the discussion that would ensue).
  132. Discuss the concept of YAGNI and explain something you did recently that adhered to this practice.
  133. Explain what is meant by a sandbox, why you would use one, and identify examples of sandboxes in the wild.
  134. Concurrency
  135. What's the difference between Locking and Lockless concurrency models?
  136. What kinds of problems can you hit with locking model? And a lockless model?
  137. What trade offs do you have for resource contention?
  138. How might a task-based model differ from a threaded model?
  139. What's the difference between asynchrony and concurrency?
  140. Are you still writing code? Do you love it?
  141. You've just been assigned to a project in a new technology how would you get started?
  142. How does the addition of Service Orientation change systems? When is it appropriate to use?

No comments:

Post a Comment