A new Codeplex project for bulk work item manipulation

I just heard about a new Codeplex project for bulk changes to work items.  Excel is a good solution for many bulk changes but we really don’t have a great solution for rapidly changing a lot of work item links.  This looks like it might be a useful tool in that regard.  I haven’t had a chance to try it yet but you might want to check it out.

Dotfuscator Gets Better (and still FREE) in Visual Studio 2010

This week I’ve been learning about a free tool included with Visual Studio 2010 called Dotfuscator Software Services by PreEmptive Solutions. If you’re using the version included with Visual Studio 2008 then you are already familiar with it’s code obfuscation technology. You get a lot more with Visual Studio 2010. They’ve added a whole new class of features and services based on code injection like tamper defense and notification as well as performance and usage monitoring. If you’ve ever wanted to instrument your application to see how users really use your apps so you can improve them, this may be the solution for you.

I’ve been working with some folks to provide you with some How Do I videos on how to get up and running quickly. The videos will be released on the usual Dev Center locations so stay tuned.

Of what I’ve learned so far it’s super simple to set up your application in Visual Studio 2010 and compile it with these features. The application then communicates with a free cloud service called the Runtime Intelligence Services Portal that lets you analyze the data from your running applications. But what if you don’t want to use PreEmptive’s free cloud service and would rather host your own endpoint and collect your own data? You’re in luck because today PreEmptive announced an open source starter kit for creating and hosting your own endpoint. Check it out on CodePlex: http://riendpointkit.codeplex.com/ .

What’s the rub, how do these guys make money if it’s all free? The free version included in Visual Studio 2010 has some great features but the Pro versions have even more, of course! Take a look at the feature comparison here.

The Weekly Source Code 50 – A little on ”A generic error occurred in GDI+” and trouble generating images on with ASP.NET

I got a nice little Yellow Screen of Death (YSOD) error on some code running under IIS that worked fine when running on the VS Developer Web Server. The error was ”A generic error occurred in GDI+” and you know that if an error is generic, it’s sure in the heck not specific.

My little application takes an overhead map that’s stored in a local file, does some calculations from user input and draws an X on the map, then returns the resulting dynamically generated image.

There’s basically three ways to do images on the server side. Use Native APIs and Interop, which only works in full trust, use System.Drawing, which ”isn’t supported” or use WPF on the server side, which also, ahem, isn’t officially supported. I’m still trying to figure out why, but just to be clear, I used System.Drawing in extremely high traffic sites with no problems. As long as paid close attention to my unmanaged resources, I have never had a problem. I’ve heard anecdotally of people having trouble with GDI+ (System.Drawing) and switching over to WPF and having no problem with that. As with all things, test what you’re doing. There’s even some ASP.NET Controls on CodePlex that might help.

Now this post can’t answer ALL reasons you’re getting ”a generic error occurred in GDI+” but it can answer mine. In my particular case (and I think this is the most common mistake) I was saving the composited image as a PNG.

First, I’ll show you a little chunk of a code from 5 years ago that took two images and built a single image from them.

01.public class SomeCheckImageHandler : IHttpHandler
02.{
03.    //some stuff snipped
04.   
05.    public SomeCheckImageHandler(){}
06.  
07.    public void ProcessRequest(HttpContext context)
08.    {
09.        context.Response.ContentType = "image/jpg";  
10.  
11.        //some stuff snipped
12.        GetCheckImageRequest req = new GetCheckImageRequest();
13.        //some stuff snipped, get the params from the QueryString
14.        GetCheckImageResponse res = banking.GetCheckImage(req);
15.  
16.        //some stuff snipped
17.        if (res.ImageBack != null)
18.        {
19.            //merge them into one image
20.            using(MemoryStream m = new MemoryStream(res.BackImageBytes))
21.            using(Image backImage = System.Drawing.Image.FromStream(m))
22.            using(MemoryStream m2 = new MemoryStream(res.BrontImageBytes))
23.            using(Image frontImage = System.Drawing.Image.FromStream(m2))
24.            using(Bitmap compositeImage = new Bitmap(frontImage.Width,frontImage.Height+backImage.Height))
25.            using(Graphics compositeGraphics = Graphics.FromImage(compositeImage))
26.            {
27.                compositeGraphics.CompositingMode = CompositingMode.SourceCopy;
28.                compositeGraphics.DrawImageUnscaled(frontImage,0,0);
29.                compositeGraphics.DrawImageUnscaled(backImage,0,frontImage.Height);
30.                compositeImage.Save(context.Response.OutputStream, ImageFormat.Jpeg);
31.            }
32.        }
33.        else //just show the front, we've got no back
34.        {
35.            using(MemoryStream m = new MemoryStream(frontImageBytes))
36.            using(Image image = System.Drawing.Image.FromStream(m))
37.            {
38.                image.Save(context.Response.OutputStream, ImageFormat.Jpeg);
39.            }
40.        }
41.    }
42.}

This code generated a JPEG. No problems, runs fine even today. Now, the code I was working on created a PNG and when you create a PNG you need a seekable stream. This little sample uses the BaseHttpHandler Phil and I made.

Note the highlighted lines in this sample. (You’ll see the highlights if you view this post on my blog directly, rather than from RSS.)

The Trick for making PNGs: Without the extra intermediate MemoryStream to save to, you won’t be able to make PNGs. You can’t image.Save() a PNG directly to Response.OutputStream.

01.namespace FooFoo
02.{
03.    public class MapHandler : BaseHttpHandler
04.        public override void HandleRequest(HttpContext context)
05.        {
06.            string filename = context.Server.MapPath(".") + @"\images\newmap2000.jpg";
07.            using (FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read))
08.            {
09.                using (System.Drawing.Image image = System.Drawing.Image.FromStream(fs))
10.                {
11.                    using (Graphics g = Graphics.FromImage(image))
12.                    {
13.                        BrickFinderDrawing drawer = new BrickFinderDrawing(...somedata...);
14.                        drawer.DrawBrick(g);
15.                        drawer.DrawName(g);
16.                        using (MemoryStream stream = new MemoryStream())
17.                        {
18.                            image.Save(stream, ImageFormat.Png);
19.                            stream.WriteTo(context.Response.OutputStream);
20.                        }
21.                    }
22.                }
23.            }
24.        }
25.        public override bool RequiresAuthentication
26.        {
27.            get { return false; }
28.        }
29.        public override string ContentMimeType
30.        {
31.            get { return "image/png"; }
32.        }
33.        public override bool ValidateParameters(HttpContext context)
34.        {
35.            return true;
36.        }
37.    }
38.}

Just a little something I wish I remembered when I hit the YSOD. Sure glad I have a blog to put this kind of stuff on! ;)

Upgrading from TFS 2010 Beta 2 to TFS 2010 RC done

The upgrade was smooth, let me tell you the steps:

note: If you are upgrading from TFS 2008 you can follow our Rules to better TFS 2010 Migration

  1. Snapshot the hyper-v server 
    There are two reasons why you should never do this while the server is running:

    1. It’s Slow – Make sure you turn off your server before you take a snapshot. It took 15 minutes to get to 2% while the server was running, but turning it off had the whole operation completed in under 30 seconds. I think of this as very like the feature of Linux that let you recompile the kernel on the fly to avoid rebooting when adding drivers: Nice to have, but only if you have 10 hours to spare.
    2. It’s Dangerous – Brian Harry has an even better reason why you should never snapshot a running server.
  2. Uninstall Visual Studio Team Explorer 2010 Beta 2 
    You will need to uninstall all of the Visual Studio 2010 Beta 2 client bits that you have on the server. That’s a no brainer, but you can remove them early to streamline your installation process
  3. Uninstall TFS 2010 Beta 2
  4. Install TFS 2010 RC
  5. Configure TFS 2010 RC
    Pick the Upgrade option and point it at your existing “tfs_Configuration” database to load all of the existing settings
  6. Test the server

All of our 52 developers are now up and running on TFS 2010 RC. Well…almost all. A couple of guys reported this problem even though they had previously connected to TFS 2010 Beta 2:

  1. If you get this error on the VS 2008 client after the upgrade, you should check whether you have KB74558 installed, if not you can download it manually or run diagnostics to ensure your entire system is up to date.
    clip_image002
    Figure: Error TF31001 or TF253022, but why is that link not clickable.

    clip_image001
    Figure:  Check that you have the update so you can connect to TFS 2010 via “Help | About Microsoft Visual Studio” 

 

I will be ironing out any other kinks tomorrow…

Next steps includes upgrading our build servers and moving all 52 developers over to Visual Studio 2010.

We were the first company on Beta 2 in production and I believe we are first on RC in production.

Windows Azure Platform at a Glance

This is my first attempt at parsing and summarizing the Windows Azure Platform, so I expect it to evolve as I iterate on it.

Windows Azure Platform at a Glance

The Windows Azure platform is a set of cloud computing services for creating and consuming cloud applications and services.  The key components of the Windows Azure Platform are:

  • Windows Azure – provides virtualized compute, storage, and management for your cloud-based applications.  It’s effectively a “cloud OS.”
  • SQL Azure – provides cloud-based relational database services.
  • App Fabric – provides application infrastructure services for federated authorization and for distributed application challenges (service composition and connectivity challenges.)

You can use the Windows Azure Platform from your applications running in the cloud and from on-premises applications.  For example, you might access data in the cloud from an on-premises app, or you might access local user accounts from an app in the cloud.

Windows Azure
Windows Azure provides compute, storage, and management through Microsoft data centers.   The key components are:

  • Compute Service – process requests.  Compute services are Virtual Machine (VM) instances that come in two types:  Web Roles and Worker Roles.  Web Roles include Internet Information Services (IIS) and can accept HTTP and HTTPS Requests.  Worker Roles aren’t configured with IIS and are primarily for background processing, such as queuing, monitoring, or ticket-system scenarios.
  • Storage Service – stores data.  It provides blobs, tables, and queues.  Blobs and tables are for storing and retrieving data, but queues are primarily for Web Role instances to talk to Worker Role instances in an asynchronous way.
  • Fabric – provides physical machines for compute and storage.  The servers for Windows Azure live within a Microsoft data center.  These servers are organized into a Fabric.   This Fabric of machines provides the compute and storage capabilities.  These physical machines host the VM instances that provide the compute services.  The machines are controlled by a Fabric Controller.   The Fabric Controller talks to a Fabric Agent on each machine.  The Fabric Controller determines which physical machines to spin up Web and Worker Role VM instances and it monitors the health of the VMs and the physical machines.

For more on Windows Azure, see Windows Azure SDK (MSDN.)

SQL Azure
SQL Azure provides cloud-based services for relational databases, reporting and analytics, and data synchronization.  The main component is a SQL Azure Database:

  • SQL Azure Database – provides a highly available, scalable, multi-tenant database service hosted by Microsoft in the cloud.  It’s a cloud-based relational database service built on SQL Server technologies.  You can access a SQL Azure Database through a Tabular Data Stream (TDS) protocol, which means you can use any existing SQL Server client library, such as ADO.NET, ODBC, or PHP.

For more information on SQL Azure, see SQL Azure (MSDN.)

App Fabric
Windows Azure platform AppFabric (formerly called “.NET Services”) provides common application infrastructure services for distributed applications.  The key components are:

  • Access Control – provides authentication and authorization services through rules and claims.  It’s a standards-based service that supports multiple credentials and relying parties.  It enables federated identity and supports Active Directory, as well as other identity infrastructures.
  • Service Bus – provides secure connectivity options for service endpoints that would otherwise be difficult or impossible to reach.  It supports various communication patterns such as relayed, buffered, bidirectional, publish-subscribe, multicast, streaming and direct-connect.  Service Bus provides infrastructure for large-scale event distribution, naming, and service publishing.  It helps address the challenges of firewalls, NATs, dynamic IP, and disparate identity systems.  Service Bus can provide a service with a stable Uniform Resource Identifier (URI) that you can be accessed by any authorized client application.  Service Bus supports REST and HTTP Access from non-.NET platforms and it supports standard protocols and extends similar standard bindings for Windows Communication Foundation (WCF.)

For more on App Fabric, see App Fabric Service Bus (MSDN) and App Fabric Access Control (MSDN.)

For more information on the Windows Azure Platform, here are some of the main Azure starting points:

Patch for VS 2010 RC Intellisense Crash Issue Now Available

 [In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu]

Last week I blogged about an intellisense crashing issue that is unfortunately in the VS 2010 RC. 

Crash Symptom

If you are encountering frequent VS 2010 crashes when you are typing in the editor while Intellisense is popping up and/or being dismissed then you are running into this issue.

Patch Now Available

This morning we made available a VS 2010 RC patch which fixes this issue.  You can download and run it here

Please apply it if you are encountering any crashes with the VS 2010 RC, or if you have a tablet, multi-touch, screen-reader or external devices attached (including Wacom tablets, phones/ipods, and others that connect via USB).

Please make sure to submit any issues you encounter with the VS 2010 RC to us via the connect.microsoft.com web-site.  Once you’ve entered the issue there please send me email (scottgu@microsoft.com) with a pointer to the issue and I’ll make sure the appropriate team follows up quickly.

SharePoint 2010 Reference: Software Development Kit

Brief Description
Beta release, November 2009
The Microsoft SharePoint 2010 (Beta) Software Development Kit (SDK) contains conceptual overviews, programming tasks, samples, and references to guide you in developing solutions based on SharePoint 2010 products and technologies.

On This Page


Quick Details

File Name: SharePointPlatformSDK.exe
Version: NOV09_Beta
Date Published: 11/18/2009
Language: English
Download Size: 198.3 MB
Estimated Download Time: 8 hr 4 min 56K

 8 hr 4 min 

Overview

[This documentation is preliminary and is subject to change.]

The Microsoft SharePoint 2010 Software Development Kit (SDK) includes documentation and code samples for Microsoft SharePoint Foundation 2010 and for Microsoft SharePoint Server 2010, which builds upon the SharePoint Foundation 2010 infrastructure. The documentation includes detailed descriptions of the technologies that SharePoint Server 2010 and SharePoint Foundation 2010 provide for developers, reference documentation for the server and client object models, and step-by-step procedures for using and programming with these technologies and object models. This SDK also includes best practices and setup guidance that will help you get started with your own custom applications that build and extend upon the SharePoint Foundation 2010 and SharePoint Server 2010 platforms.

For additional information, you can visit the SharePoint Developer Center on the Microsoft Developer Network (MSDN): http://msdn.microsoft.com/sharepoint. Visit frequently to learn about recently published content; to view essential getting started content; to view rich media content such as videos and screencasts; to get connected to instructor-led training and other learning resources; to learn more about product features and scenarios in our MSDN Resource Centers; and to find community resources such as MSDN forums, newsgroups, MVP blogs, and much more.

The SDK also includes many code samples that address common customization scenarios and solution building blocks. Future (quarterly) releases will contain additional samples, and you can also check MSDN Code Gallery for SharePoint solutions and code samples.

 Top of page

System Requirements

  • Supported Operating Systems: Windows 7; Windows Server 2003; Windows Server 2008; Windows Server 2008 R2; Windows Vista; Windows XP
  • The SDK does not require additional applications to install the files. However, to use the code samples, we recommend that you also install the following applications on the same computer where the package is installed:
    • Microsoft Visual Studio 2010 Beta 2, Microsoft Visual Studio 2008, or Visual Studio 2005 to open and compile the sample projects
    • Microsoft SharePoint Foundation 2010 (Beta)
    • Microsoft SharePoint Server 2010 (Beta)
    • Microsoft .NET Framework 3.5 Redistributable Package
  • For more information and detailed setup instructions for developing with SharePoint 2010 products, read Setting Up the Development Environment for SharePoint Server in the SharePoint 2010 (Beta) SDK.

 Top of page

Instructions

To install this download:

  1. Download the setup program by clicking the Download button and saving the file to your hard disk drive.
  2. Double-click the SharePointPlatformSDK.exe program file on your hard disk drive to start the setup program.
  3. Follow the instructions on the screen to complete the installation.

    Note   By default, the setup program installs both SharePoint Foundation 2010 and SharePoint Server 2010 documentation and samples. To install only the SharePoint Foundation 2010 SDK documentation, select SharePoint Server 2010 Help and Samples, and then click Entire feature will be unavailable in the setup program.

The default installation directory is %PROGRAMFILES%\Microsoft SDKs. The setup file installs a Start menu shortcut: Navigate to All Programs, and then click Microsoft SDKs.

To remove this download:

  • To remove the download file, delete SharePointPlatformSDK.exe.
  • To remove the installed files, use Control Panel, and then click Uninstall a program.
    The program is installed as Microsoft SharePoint 2010 SDK.

SQL Server 2008 R2 Update for Developers Training Kit

Overview

SQL Server 2008 R2 offers an impressive array of capabilities for developers that build upon key innovations introduced in SQL Server 2008. The SQL Server 2008 R2 Update for Developers Training Kit is ideal for developers who want to understand how to take advantage of the key improvements introduced in SQL Server 2008 and SQL Server 2008 R2 in their applications, as well as for developers who are new to SQL Server. The training kit is brought to you by Microsoft Developer and Platform Evangelism.

Overview and Benefits
The training kit offers the following benefits:

  • Learn how to build applications that exploit the unique features and capabilities of SQL Server 2008 and SQL Server 2008 R2.
  • Provides a comprehensive set of videos, presentations, demos and hands-on labs
  • Contains new content for developers who are new to SQL Server.
  • Contains new content for SQL Server 2008 R2.
  • Contains all of the existing content from the SQL Server 2008 Developer Training Kit.
  • Easy to download and install.

Intended Audience
The training kit is designed for the following technical roles:

  • Developers who build applications for the Microsoft platform.
  • Microsoft evangelists, technical specialists and consultants.

Contents
The training kit includes the following content:

  • Videos (8)
    • SQL Server 2008 R2 Update for Developers Overview Part I – SQL Server 2008 Review
    • SQL Server 2008 R2 Update for Developers Overview Part II – Introducing SQL Server 2008 R2
    • Introducing SQL Server 2008 R2 StreamInsight
    • Demo: Real Time Analytics with SQL Server 2008 R2 StreamInsight
    • Introducing SQL Server 2008 R2 Application and Multi-Server Management
    • Introducing SQL Server 2008 R2 Reporting Services
    • Introduction To SQL Server 2008 R2 StreamInsight and Complex Event Processing
    • Introducing PowerPivot for Excel 2010 and SharePoint 2010
  • Presentations (8)
    • SQL Server 2008 R2 Update for Developers Overview Part I – SQL Server 2008 Review
    • SQL Server 2008 R2 Update for Developers Overview Part II – Introducing SQL Server 2008 R2
    • SQL Server 2008 Filestream
    • SQL Server 2008 Spatial
    • SQL Server 2008 T-SQL
    • SQL Server 2008 Date and Time Types
    • SQL SErver 2008 SQLCLR
    • SQL Server 2008 Reporting Services
  • Demos (13)
    • AdventureWorks Racing All-Up SQL Server 2008 Demo
    • SQL Server 2008 All-Up Spatial Demo
    • SQL Server 2008 Spatial Types Demo
    • Intro to SQL Server 2008 Filestream Demo
    • SQL Server 2008 SQL CLR Nullable Types Demo
    • Programming with SQL Server 2008 Filestream Demo
    • SQL Server 2008 Reporting Services Web Application Integration Demo
    • Date and Time Support in SQL Server 2008 Demo
    • SQL Server 2008 T-SQL Table-Valued Parameters Demo
    • SQL Server 2008 T-SQL Row Constructors Demo
    • SQL Server 2008 T-SQL Grouping Sets Demo
    • SQL Server 2008 T-SQL Merge Demo
  • Hands-on Labs (8)
    • How to build your first Web Application with SQL Server and ASP.NET
    • Using SQL Server 2008 Spatial Data in TSQL
    • Using SQL Server 2008 Spatial Data in Managed Code
    • Using SQL CLR in SQL Server 2008
    • PowerPivot in SQL Server 2008 R2
    • Using the New Features of Reporting Services 2008 R2
    • Introduction To SQL Server 2008 R2 StreamInsight and Complex Event Processing
    • Data-tier Applications in SQL Server 2008 R2 and Visual Studio 2010

SmallestDotNet Update – Now with .NET 4 support and an includable JavaScript API

A few years back I wrote a post on the size of the .NET Framework. There’s historically been a lot of confusion on the site of the .NET Framework. If you search around on the web for ”.NET Framework” or ”.NET Framework Redistributable” you’ll often get a link to a 200 meg download. That download is the complete offline thing that developers redistribute when they want to install the .NET Framework on any kind of machine without an internet connection.

The .NET 3.5 Client Profile is more like 28 megs and the .NET 4 Client Profile is a looking smaller that than, in fact. Back then I made this website,SmallestDotNet.com to help out. It’ll sniff your browser’s UserAgent and tell you want version of .NET you have, how big the download would be to get you to .NET 3.5 and what .NET redistributable is best for you in order to minimize your download.

Now that the .NET Framework 4 is coming out soon, I took an hour and updated it (with Tatham Oddie’s help, as he’s staying over at the house this week) to support the new framework. We also added a few bug fixes (and I’m sure, a few bugs) and a simple Javascript API to help you detect the .NET Framework on the client side.

You can use the site in three ways.

First, visit the site.

If you’ve got a machine you want to install .NET on, or you’re not sure what version it has, just visit SmallestDotNet.com and I’ll do my best to tell you. It works best on IE, but it’ll also work on Firefox if you’ve got the .NET add-on. If you’ve got Safari or Chrome, I’ll apologize but I can’t help you as those browsers don’t tell me anything about .NET.

Second, include the Javascript that spits HTML.

If you want to tell the user what version of .NET they have with minimal effort and you want to do it on your site, perhaps via your blog, you can just include this line:

1.<script type="text/javascript" src="http://www.smallestdotnet.com/smallestdotnet/javascript.ashx"></script>

and I’ll return something like:

1.document.write('<span>')
2.document.write('Detected 3.5 SP1 .NET Framework. No update needed.')
3.document.write('</span>')

and you can style to taste.

Third, include the Javascript that spits JSON.

The HTML spitter is fast, but less useful if you like control over things. Like, um, text. So, you can include:

and I’ll spit out a JSON object like this:

01.SmallestDotNet = {};
02.SmallestDotNet.latestVersion = {
03.                major: 4,
04.                minor: 0,
05.                profile: "client",
06.                servicePack: null               
07.        };
08.SmallestDotNet.allVersions = [
09.  {
10.                major: 4,
11.                minor: 0,
12.                profile: "client",
13.                servicePack: null               
14.  },
15.  {
16.                major: 3,
17.                minor: 5,
18.                profile: "full",
19.                servicePack: 1               
20.  },
21.  {
22.                major: 2,
23.                minor: 0,
24.                profile: "full",
25.                servicePack: null               
26.  }
27.];

We’ll put out the latest version of the .NET framework on the machine, as well as its Service Packs, and its profile (client profile, full, etc) if appropriate. It’ll also give you an array of ALL the versions of the .NET Framework it finds on the machine. In my example, it says my machine has .NET 4 Client Profile, .NET 3.5 SP1 and .NET 2.0.

I currently don’t go into deep deep detail, like .NET 2.0 SP2, etc, but if you want that functionality, let me know and I can add it. This is a spike (ongoing for two years, actually) so if it’s useful, let me know. If it’s missing something, let me know.

From this JSON, you can ask all sorts of questions. Here’s a JavaScript alert() example that would work on this JSON object. Of course, you should check things for null, as well as check the length of allVersions.

1.alert( SmallestDotNet.latestVersion.major );
2.alert( SmallestDotNet.allVersions.length );
3.alert( SmallestDotNet.allVersions[0].minor );
4.alert( SmallestDotNet.allVersions[1].major );");

It’d be cool to add some jQuery love to this and use it to give and end-user some nice feedback on what version of your application to install, or what version of .NET they should install first. It could also be useful for self-troubleshooting your application.

Hope this is useful. Enjoy.

ASP.NET MVC 2 (Release Candidate 2) Now Available

 [In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu]

Earlier this evening the ASP.NET team shipped ASP.NET MVC (Release Candidate 2) for VS 2008/.NET 3.5.  You can download it here.

The RC2 release of ASP.NET MVC 2 is a follow-up to the first ASP.NET MVC 2 RC build that we shipped in December.  It includes a bunch of bug fixes, performance work, and some final API and behavior additions/changes.  Below are a few of the changes between the RC1 and RC2 release (read the release notes for even more details):

  • The new ASP.NET MVC 2 validation feature now performs model-validation instead of input-validation (this means that when you use model binding all model properties are validated instead of just validations on changed values of a model).  This behavior change was based on extensive feedback from the community.
  • The new strongly-typed HTML input helpers now support lambda expressions which reference array or collection indexes.  This means you can now write code like Html.EditorFor(m=>m.Orders[i]) and have it correctly output an HTML <input> element whose “name” attribute contains the index (e.g. Orders[0] for the first element), and whose “value” contains the appropriate value.
  • The new templated Html.EditorFor() and Html.DisplayFor() helper methods now auto-scaffold simple properties (and do not render complex sub-properties by default).  This makes it easier to generate automatic scaffolded forms.  I’ll be covering this support in a future blog post.
  • The “id” attribute of client-script validation message elements is now cleaner.  With RC1 they had a form0_ prefix.  Now the id value is simply the input form element name postfixed with a validationMessage string (e.g. unitPrice_validationMessage).
  • The Html.ValidationSummary() helper method now takes an optional boolean parameter which enables you to control whether only model-level validation messages are rendered by it, or whether property level validation messages are rendered as well.  This provides you with more UI customization options for how validation messages are displayed within your UI.
  • The AccountController class created with the default ASP.NET MVC Web Application project template is cleaner.
  • Visual Studio now includes scaffolding support for Delete action methods within Controllers, as well as Delete views (I always found it odd that the default T4 templates didn’t support this before).
  • jQuery 1.4.1 is now included by default with new ASP.NET MVC 2 projects, along with a –vsdoc file that provides Visual Studio documentation intellisense for it.
  • The RC2 release has some significant performance tuning improvements (for example: the lambda based strongly-typed HTML helpers are now much faster).

Today’s RC2 release only work with VS 2008 and .NET 3.5.  We’ll shortly be releasing the VS 2010 RC (which will be available for everyone to download). It will include ASP. NET MVC 2 support built-in (no separate download required).

Hope this helps,

Scott

P.S. The source code for the ASP.NET MVC RC2 release (along with a MVC futures library that goes with it) can be downloaded here. You can learn even more about ASP.NET MVC 2 by reading the ASP.NET MVC 2 blog series I’m working on.

WordPress Themes Hosted Exchange , Hosted CRM. Hosted Sharepoint Online backup dedikerad server