Scott Hanselman

ASP.NET Interview Questions

August 18, '04 Comments [45] Posted in ASP.NET | Bugs | HttpHandler | Javascript | ViewState
Sponsored By

I do a LOT of interviewing here, and for a while we were hiring ASP.NET people.  Here's some of the questions that I asked them.  I came up with these questions because you'd "just know" this stuff if you spent time working on a REAL WORLD ASP.NET site - through design, development, debugging, production debugging, and deployment.

Do they suck? Did I miss any?  How do you think people did?

  • 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?
  • What are ASHX files?  What are HttpHandlers?  Where can they be configured?
  • 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?
  • What events fire when binding data to a data grid? What are they good for?
  • 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?
  • How does ViewState work and why is it either useful or evil?
  • What is the OO relationship between an ASPX page and its CS/VB code behind file in ASP.NET 1.1? in 2.0?
  • What happens from the point an HTTP request is received on a TCP/IP port up until the Page fires the On_Load event?
  • How does IIS communicate at runtime with ASP.NET?  Where is ASP.NET at runtime in IIS5? IIS6?
  • What is an assembly binding redirect? Where are the places an administrator or developer can affect how assembly binding policy is applied?
  • Compare and contrast LoadLibrary(), CoCreateInstance(), CreateObject() and Assembly.Load().

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Dietary and Nutritional Information for Fast Food Restaurants

August 18, '04 Comments [5] Posted in Diabetes
Sponsored By

Wow, and then one day the internet does something useful by providing me with Dietary and Nutritional Information for Fast Food Restaurants.

Steak & Cheese Sub, 6-inch Classic sandwich
steak and melted cheese with lettuce, tomato, onion, green peppers, olives, pickles, cheese, oil, vinegar, salt and pepper on Italian white bread
Nutrition Facts
Serving Size:
  1 6-inch sub • 256g
Amount Per Serving
Calories  390Calories from Fat  126
% DV*
Total Fat  14g22%
    Saturated Fat  5g25%
Cholesterol 35mg12%
Sodium  1210mg50%
Total Carbohydrate  48g16%
    Dietary Fiber  5g20%
    Sugars  7g 
Protein  24g48%
Vitamin A  10%Vitamin C  40%
Calcium  15%Iron  45%

Unofficial Pts: 8

Percent of Calories from:
Fat-32.3%     Carb-49.2%     Protein-24.6%    
(Total may exceed 100% due to rounding)

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

The ASP.NET Cache object in a Web Gardening scenario with IIS5 or IIS6

August 18, '04 Comments [3] Posted in ASP.NET
Sponsored By

Remember that "Web Gardening" is like having a tiny Web Farm on a multi-proc box.  Each processor gets an ASP.NET Worker Process with affinity (that means the process "sticks") to that processor.

But what happens if you use the Cache object?  Well, each AppDomain gets a Cache object, and each ASP.NET Worker Process has one AppDomain per Web Site, and each processor gets one WP, so...if you have four processors, the Cache object will exist four times.

That means, ASP.NET Cache state is NOT shared amongst processors in a single-box multi-proc system.

Make sure you grok this if you ever find yourself working on a single box web site with multiple procs and web gardening on.  If you've:

  • coded your site to assume that the cache will fill once and only once per machine
  • used physical files as CacheDependancies to key off the cache
  • assumed that any one user will magically return to the same process on the same machine on subsequent requests

then things may well behave differently than you thinkin a web gardening scenario.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Nantpad: The Good and the Bad of it

August 17, '04 Comments [8] Posted in Nant | Tools
Sponsored By

Good: Nantpad version 1.0 is out.

Good: Nantpad gives you a friendly way to author and run NAnt build files.

Bad: They have GOT to be kidding with the pricing. $250 a seat for an editor to an open source tool?  Come on, guys, NAnt is NOT that hard to edit.  $25, no brainer.  $50 gives me pause.  $250 must be a joke.  God bless you for trying. Now try again.

For now, I'll continue to use intellisense and VS.NET to edit build files as outlined in a previous post, using either this older schema or one from http://nant.sourceforge.net/schema/ whenever the 0.85 schema gets updated.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Mrs. Mayfield-Hill, my fifth grade teacher

August 15, '04 Comments [3] Posted in Speaking
Sponsored By

Marianne Mayfield is my fifth-grade teacher and the reason I'm in computers today.  She was at my wedding, at graduations, at family events. Twenty years later and we are still close.

When I was young, she recognized that I was "at risk for trouble" and sat down with my family in order to find a way to get me back on track.  She saw that I was transfixed by the Apple II in our classroom and set it up so we could sneak the computer out of the school as long as it was back by Sunday Night and noone noticed.

She taught me to think before speaking (still working on that one.)

She taught me that using one's gifts for good is a responsibility as much as it is a privilege.

She taught me how to speak publicly.

She taught me how to be polite and slow down (still working on that one.)

She taught me what's important in life is people.

I continue to wish her all the best in her fight with cancer.  If anyone's going to beat it, it will be her.

Thank you.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.