Scott Hanselman

Visual Studio 2010 Released

April 12, '10 Comments [114] Posted in ASP.NET | ASP.NET MVC | Learning .NET | Microsoft | MSDN | Spotlight | VS2010 | Windows Client | WPF
Sponsored By

It's a big day at Microsoft today as Visual Studio 2010 officially releases. There's a lot going on with this release and I thought I'd do a big rollup post with lots of details and context to help you find your way to the information and downloads you're looking for.

Visual Studio 2010 and .NET 4

Download Visual Studio 2010

First, if you want it, go download Visual Studio 2010 now. If you're an MSDN Subscriber or WebSiteSpark/BizSpark member, you can download the final release now. If not, you can download a free trial or one of the free Express editions.

I'm running the free Visual Web Developer 2010 Express on my netbook. You can install ASP.NET 4, ASP.NET MVC 2, and Visual Web Developer 2010 Express really quickly with the Web Platform Installer.

There's an excellent page on MSDN that's cherry-picked and categorized the best VS2010 content, but I've included my own list below.

What's new in Visual Studio 2010 and .NET 4?

Buttloads. Here's the things I'm digging most.

Also, there's a FREE e-Book called "Moving to Visual Studio 2010" that you might want to check out. It's an excerpt of a larger book that'll be coming from MSPress later this summer. It takes a interesting approach as it has three parts, moving from VS2003, moving from VS2005, and moving from VS2008. It's clever, actually. You start in the book on the version that you're currently on. If you're not familiar with versions like VS2008, you start at the beginning. Otherwise, you jump ahead. When you're done, you're ready to move to VS2010.

MSDN and Visual Studio 2010

When a new product launches, MSDN launches with updates and new features of its own. Here's a few things the folks at MSDN have been doing to support the launch.

  • Better MSDN Search - Most people likely use a search engine to search MSDN, but if you do search from within MSDN, there are a number of new improvements. You can refine by source, saying only search blogs, or only search the library. There's also an OpenSearch provider so you can search the MSDN Library directly from within Windows itself.
    XDocument - Search Results in MSDN
    MSDN Search also includes Metadata from the results to help you find right thing. For example, if a search turns up a CodePlex project, I can see type-specific details within search results:
    MSDN Search
  • MSDN Subscriber Downloads Improvements - There's been lots of UX improvements including as-you-type filtering as well as filtering by platform (x64, etc) and language. I will very likely not need to download Quechua Windows, so now I don't need to see it.
  • MSDN Library in Lightweight and ScriptFree - You can choose between three flavors of MSDN Library, Classic (the one with the treeview on the side), Lightweight (what I use) or ScriptFree. ScriptFree is great for mobile devices, and it's lightning fast anywhere. Lightweight is the new default and I like it because it features community annotations made to the library prominently on the left side as well as a tabbed interface for code sample languages. I blogged a preview of this work last year and included some charts and graphs showing the improvements in speed worldwide.
    XmlNode Class (System.Xml) - Windows Internet Explorer
  • Integration of all VS sites - There were too many developer "centers" on MSDN and folks were getting lost. Many centers have been conflated into a clearer, more logical layout. The Visual Studio, Team System, and VS Extensibility Centers were merged into the single Visual Studio Center. There's a lot more focus on discoverability in the Visual Studio Center.
  • Video Improvements - There's thousands of How Do I? videos on MSDN and they tell me they are improving the backend, the player and the metadata around them. The player is larger now, you can share videos from MSDN on your favorite social networking site, rate them, leave comments, and explore related videos.
  • Profile Activities - User Profiles are integrated between sites and you can see your activity and points as you move through the system. For example, here's Arnie Rowland's profile. You can see his activity in the forums and galleries as well as his ranking and points as a community contributor.

Other Cool Stuff Happening Today

I'd hate to have this little nugget get buried in the deluge of VS2010 goodness.

  • Microsoft Surface Logo The Surface Toolkit for Windows Touch BETA goes out today. Check out under Technical Resources and the Surface Blog for more details. This toolkit is a set of controls and sample code that let WPF developers create cool multi-touch enabled experiences with the cool "Surfacey" controls that the only folks with Big Ass Tables have been able to use. This is exceedingly cool because it not only makes it WPF devs can make better multi-touch apps for Windows Touch PCs but it acts as a jump-start for the next version of Microsoft Surface. It will integrate with Visual Studi0 2010 and give you new project and item templates and a dozen new controls like the ScatterView and SurfaceInkCanvas. This is a cool thing, so I'll be talking about it soon, as will Pete Brown.

Lots of great stuff going on today. Have fun!

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

Hanselminutes Podcast 209 - ASP.NET MVC Contrib with Jeffrey Palermo

April 12, '10 Comments [0] Posted in ASP.NET MVC | Podcast
Sponsored By

image My two-hundred-and-ninth podcast is up. I talk with Jeffrey Palermo to chat about his thoughts around ASP.NET MVC and the MVCContrib Project. What's the MVCContrib Project for? What value does it bring to the platform, and what's the story behind it joining the CodePlex Foundation?

Subscribe: Subscribe to Hanselminutes Subscribe to my Podcast in iTunes

Download: MP3 Full Show

Links from the Show

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

I want to add a big thanks to Telerik. Without their support, there wouldn't be a Hanselminutes. I hope they, and you, know that. Someone's gotta pay the bandwidth. Thanks also to Carl Franklin for all his support over these last 4 years!

Telerik is our sponsor for this show.

Building quality software is never easy. It requires skills and imagination. We cannot promise to improve your skills, but when it comes to User Interface and developer tools, we can provide the building blocks to take your application a step closer to your imagination. Explore the leading UI suites for ASP.NET AJAX,MVC,Silverlight,Windows Formsand WPF. Enjoy developer tools like .NET reporting, ORM,Automated Testing Tools, TFS, and Content Management Solution. And now you can increase your productivity with JustCode, Telerik’s new productivity tool for code analysis and refactoring. Visit

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

Enjoy. Who knows what'll happen in the next show?

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

ASP.NET 4 - Breaking Changes and Stuff to be Aware of

April 12, '10 Comments [6] Posted in ASP.NET | VS2010
Sponsored By

If you're getting started with ASP.NET 4, there's a few things you might run into that could throw you for a loop if you didn't expect them. Remember that while ASP.NET is a very compatible release, it is also a side-by side release so this was a good time to make breaking changes for the better.

Note that just installing ASP.NET 4 won't break your applications. You can happily run all your ASP.NET applications side by side each in their own AppPool. These first two "gotchas" below are if you're moving an existing application over to .NET 4. The third gotcha is an install ordering thing.

Request Validation is more strict by default.

Request validation is more strict by default in ASP.NET 4.  Pretty much anyone moving a non-trivial ASP.NET 2 application over to ASP.NET 4 has a good likelihood of running into this.  The workaround is pretty simple. If you want to revert the behavior of the validator to pre-ASP.NET 4, add this to your web.config:

<httpRuntime requestValidationMode="2.0" />

That's it. Of course, you can always dig in a bit and see why your app doesn't like the stricter validation and fix that as well.

"I switched my ASP.NET 2/3.5 application over to an ASP.NET 4 application pool and it broke because I didn’t run the VS2010 upgrade wizard"

If you just go into IIS and change your existing app's AppPool to ASP.NET 4, you might get an error. The nitty gritty details are here, but the average customer's brain will melt reading the details.

So instead, a quick way to fix this (assuming you don't want to upgrade the app) is

  1. Make sure you have SP2 installed if they are running Vista and Windows Server 2008. If you are in Windows7 then no service pack is needed.
  2. Go to your application's web.config and wack the standard <configSections> definition at the top.
  3. Although not required, toss the <system.codedom> section towards the middle of the web.config since it isn’t needed either.

That's it.

"I installed ASP.NET 4 and then installed IIS."

If you install VS2010 and/or .NET 4 first, then later install IIS, you need make sure IIS is configured to know about ASP.NET 4 otherwise IIS will have no idea how to run ASP.NET 4 applications.

There's a simple workaround:

  • If you are already in this state, drop to the command line and navigate to the FX install directory.  Then run "aspnet_regiis –iru". 
    • Note if you are on a 64-bit machine, run this command from the 64-bit FX install directory – not the 32-bit installation directory.

or for future reference, try to enable IIS and the ASP.NET extensibility option *first* when your are building machines or VMs.  That way when VS 2010 or .NET are subsequently installed, the installation will automatically detect the presence of IIS and will auto-register with it.

Hope this helps. The complete list of ASP.NET 4 Breaking Changes is here.

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

Spring Speaking Rollup 2010: Recent Talks and Upcoming Talks at Microsoft WebCamps

April 9, '10 Comments [13] Posted in ASP.NET | ASP.NET Ajax | ASP.NET MVC | Channel9 | Microsoft | Programming | Speaking | Windows Client | WPF
Sponsored By

DevDays and TechDays

I've been travelling some, and I have a few more trips at Microsoft WebCamps before I take a much needed break and stop travelling until 2011.

I went to Munich, Cairo, and Dubai a few weeks back and presented on ASP.NET MVC (both Beginner and Advanced), .NET 4 in general, Making Your Blog Suck Less, and Information Overload. I presented at Mix 10 on Web Development and Security with Phil Haack.

Last week I was in Belgium and The Netherlands and gave some talks as well.

I thought it would be nice to put all my recent talks in one place. So, here's some video recordings of some of my recent talks. I hope you enjoy watching them as much as I did giving them.

ASP.NET MVC 2: Basics/Introduction

Join Scott Hanselman as he explains ASP.NET MVC from File -> New Project. We’ll dig into the details and try to put MVC into perspective. Is WebForms going away? What’s better about MVC vs. WebForms? How does MVC sit on top of ASP.NET and how was it written? We’ll play with call stacks, and avoid PowerPoint slides! This is an introduction to ASP.NET, but it’s not a “basic” session. We assume you have some web development concepts or perhaps you’re a professional ASP.NET WebForms developers who is just starting out with ASP.NET MVC.

ASP.NET MVC 2: Basics

Lap Around .NET 4

In this session, Scott Hanselman gives a deep and broad tour of the .NET 4 release, with a focus on making your development experience easier. See lots of demos (and very few slides) showcasing the key new features in the .NET Framework 4 including MEF, improvements in ASP.NET, threading, multi-core and parallel extensions, additions to the base classes, changes and additions to the CLR and DLR, what's new for the languages (Visual Basic and C#), and of course, what's new in Windows Presentation Foundation and System.Web. Come and see how all these new features and capabilities improve your overall .NET experience!


Information Overload and Managing the Flow: Effectiveness and Efficiency

This talk is/was a mashup of the various techniques that I try to apply in my everyday life. There's a little GTD, a little Covey, a little Pomodoro, a little Jon Udell, a little 43 Folders, a little Merlin Mann, a little Gina Trapani, and a little Hanselman. I also show some of the tools I used to manage the flow of information in my life. I hope you enjoy it. I'm  pretty happy with the way it turned out, given that I was freaking out about it for a week.


Trip Montage - If this is Tuesday, this must be Cairo.

This isn't a talk as it's a "trip montage." I went to Munich, Cairo and Dubai. I presented in three keynotes and did a total of 10 sessions. I crossed 12 time zones and missed my kids. I talked to/with/at about 3000 people. 
I took some video while I was travelling with my Creative Vado HD and slapped it into Windows Live Movie Maker just now. Here's my trip montage. You could call this either "The Glamorous Life of a Technical Speaker" or "If this is Tuesday, this must be Cairo" or "Scott needs to learn to say No."

Web Deployment Made Awesome: If you're using XCopy, you're doing it wrong.

If you typically deploy your web applications using Windows Explorer and Aero Snap, please stop. Come see a practical session on the new deployment goodness in Microsoft Visual Studio 2010 and .NET Framework 4. We dig into Web Deploy (a.k.a. MSDeploy) and deployment from within Visual Studio 2010. Is deployment a chore? I say, nay, nay. Let's learn how to package up web apps, deploy them, their settings and component parts easily. We start with the basics and ramp it up quickly, exploring custom database providers and advanced techniques.


    The Haaha Show: Microsoft ASP.NET MVC Security With Haack and Hanselman

    Join Phil Haack and Scott Hanselman for this dynamic and unusual security session. The HaaHa brothers take turns implementing features on an ASP.NET MVC website. Scott writes a feature, and Phil exploits it and hacks into the system. We analyze and discuss the exploits live on stage and then close them one by one. Learn about XSS, CSRF, JSON Hijacking and more. Is *your* site safe from the Haack?


    Beyond File | New Company: From Cheesy Sample To Social Platform

    The web has changed and there's a new way of thinking about your applications. You can't just write some HTML and CSS anymore and expect to be the next Twitter. Hear how to make your site socially relevant in the new decade (the '10s?) This session includes everything from Microsoft ASP.NET MVC2, to Windows Communication Foundation (WCF) and OData, JSON services and blog flair, microformats, and leverage ASP.NET and Microsoft Silverlight to create rich user experiences. Let's stop messing around and start changing the world. Or at least giving Nerds a place to eat dinner.


    ASP.NET MVC 2: Ninjas Still on Fire Black Belt Tips

    Having the customer on your back to deliver features on time and under budget with tight deadlines can make you feel like you’re being chased by ninjas on fire. Join Scott Hanselman and he’ll walk through lots of tips and tricks to get the most out of the ASP.NET MVC 2 framework and deliver work quickly and with style. Come see ASP.NET MVC 2’s better productivity features as we make the most of several key features.


    Also, next month I'll be in Beijing, Shanghai and Sydney speaking at a different kind of event, the Microsoft Web Camps. These are not 1 hour presentations where we talk at you, but two days of technical content and labs. It's slower paced and deeper than a conference presentation. There will be WebCamps all over the world:

    Toronto May 07-08 Moscow May 19-19
    Beijing May 21-22 Shanghai May 24-25
    Mountain View May 27-28 Sydney May 28-29
    Singapore June 04-05 London June 04-05
    Munich June 07-08 Chicago June 11-12
    Redmond, WA June 18-19 New York June 25-26

    Hope to see you there.

    Webcamps China


    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

    Infinite Scroll WebSites via AutoPagerize - Hacky, but the beginning of something cool

    April 6, '10 Comments [20] Posted in ASP.NET
    Sponsored By

    One of the things I like the most about Bing Image search (one of the things I prefer about it) is the "infinite scroll" feature. If you search for an image and start scrolling, it'll just keep going and going, moving the scroll bar each time and appending new images on the bottom. This concept of "infinite scroll" has been called just that, as well as endless pages, autopagerize, etc. There's even a jQuery plugin called Infinite Scroll if you want to enable something like this on your site programmatically.

    oscar winners - Bing Images - Windows Internet Explorer

    However, there's also been a quiet revolution on sites, and to some extent, in browsers to make infinite scroll a standard thing. At least, a de facto standard, and you can enable it on your site with minimal effort.

    The general idea is that the browser notices that you're scrolling to the end and rather than making you click, it'll fetch the next page via AJAX and append it to the page you're already on. This screenshot from the AutoPagerize for Chrome extension shows it best:

    How Autopagerize works

    There's a few things needed and it requires a bit of dancing on your part to make it happen.

    Enabling Autopagerize as a Browser of the Web

    For the longest time Autopagerize has been a "Greasemonkey script." Greasemonkey is an add-on itself that enable others add-ons, via easy scripts, to dramatically change the behavior of your browser. I'm not a huge fan myself, as I have some security concerns. The main site that promotes this is a bit dodgy looking, at but their Extension for FireFox works and they mean well.

    Enabling Autopagerize on Firefox

    You can use GreaseMonkey and the AutoPagerize userscript if you like, but I use the AutoPagerize Firefox Extension from

    Enabling Autopagerize on Opera

    Opera supports "User JavaScript" out of the box, so you can get their oAutoPagerize script, follow some directions and you're all set. It's a modification of the standard GreaseMonkey script and it will work with Safari and GreaseKit and Chrome, although I recommend the cleaner Chrome extension.

    Enabling Autopagerize on Chrome

    Chrome has a Chrome Extension called, logically enough, AutoPagerize for Chrome. It has the benefit of a small colored square in the address bar that will show you if the current page is enabled for paging and the current status.

    I'm still looking into a reliable way to do this on IE, but you can start with the older GreaseMonkey for IE addon.

    Enabling Autopagerize as a Web Site (Blog, etc) Publisher

    Here's what it gets insane. Like "horribly gross and this will never scale" insane. There's two ways. If there are children in the room who design for the web, please ask them to leave.

    First, you can go to this online database of sites and add your site along with some *cough* regular expressions and XPath expressions that describe where the next page to retrieve is and what to append it to. Wow, Regular Expressions AND XPath? What, no "select * from authors"? And a centralized database. Good times.

    Well, my record (and most DasBlog sites) looks like:

    pageElement: id("blog-posts")

    url: ^http://www\.hanselman\.com/

    nextLink: //div[@class="previous-posts"]/a

    It basically says, you can find the next link at the anchor after the div with the class "previous posts" and you can append it to the element with the id of "blog-posts."

    So this is gross.

    Second option, and more ideally, I'd say, is this microformat. I'll actually copy/paste the microformat from the GreaseMonkey script itself as it says it all:

    var MICROFORMAT = {
    url: '.*',
    nextLink: '//a[@rel="next"] | //link[@rel="next"]',
    insertBefore: '//*[contains(@class, "autopagerize_insert_before")]',
    pageElement: '//*[contains(@class, "autopagerize_page_element")]',

    It says, find either an anchor like <a href="..." rel="next"> or a link in the head like <link rel="next" href="..."> then retrieve the page. Take the element with class "autopagerize_page_element" and append it to the element with "autopagerize_insert_before."

    If your site/blog just adds a few classes and this rel, it'll be automatically setup to support autopagerize. I wanted to site my site like this but I hit a wall in the extensibility of DasBlog, the blog engine I run. This would be a small change to DasBlog, but it would mean a new version.

    Of course, no browser supports this out of the box yet. Opera does offer a similar feature called "Fast Forward" that extends spacebar scrolling (in all browsers you can just press the spacebar to scroll down a page) such that it will navigate to the next page when you hit the bottom. Per Opera's KB:

    Fast Forward tries to analyze a page and looks for links that will take you to the next page, for example after a search with Google with several pages of search results. It looks for certain patterns that indicate a "next" link, or uses "<link rel="next">" if it is defined in the page.

    Unfortunately Opera analyzes my page and gets it wrong, selecting, oddly enough, an image as the next page to go to. This would likely be solved if I added a <link rel="next"> to my page's head, although again, I'd have to do this dynamically.

    As an aside, notice this comment from Opera on their KB...

    Please note that Fast Forward does not use any external services to determine the next page. It only looks at the current page and tries to find things that indicate that there is a "next" page. It does not look it up from an external server or contact any site to get this info.

    This means they, too, realize that an external service is folly and the only way for this to work going forward is via microformats. I fervently agree.

    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.