AppFabric-enabled WCF Data Service Walkthrough (C#)

AppFabric-enabled WCF Data Service Walkthrough (C#)

In this walkthrough I’ll show you how to use the AppFabric-enabled WCF Data Service (C#) template for Visual Studio 2010 to enhance your WCF Data Services by providing

  • Monitoring events and errors to the AppFabric Data Store
  • Eliminating the need to use the .svc extension in your URI

Requirements

Step 1 – Create a Web Application

  1. Start Visual Studio 2010
  2. Select File / New Project
  3. Choose a Web Application Template – for this example I used Empty Web Application

Step 2 – Add an ADO.NET Entity Data Model

  1. For my database I’m using the AdventureWorksLT sample database for SQL Server 2008R2
  2. Right click on your project and select Add / New Item…
  3. Select the ADO.NET Entity Data Model template
  4. Name the model AdventureWorks.edmx
  5. Select Generate From Database
  6. Connect to AdventureWorksLT and use the default settings
  7. Select all the tables by checking the Tables checkbox

Step 3 – Add an AppFabric-enabled WCF Data Service

  1. Right click on your project and select Add / New Item…
  2. Select Online Templates
  3. In the search box type AppFabric
  4. Select the AppFabric-enabled WCF Data Service (C#) template
  5. Name it AdventureWorks.svc 

    Add New Item AppFabric-enabled WCF Data Service C#
  6. Click Install to install the template on your machine

Step 4 – Modify the template code

We have added TODO tasks in the template to guide you through tasks you need to do to make your service ready

  1. Replace [[class name]] with AdventureWorksLTEntities
  2. Modify the SetEntitySetAccessRule code as shown for all entities (“*”)
  3. If you want to use a different route you can set that as well
// This method is called only once to initialize service-wide policies.
public static void InitializeService(DataServiceConfiguration config)
{            
    // Enable read only access to all entities
    config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
    config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;

    RouteTable.Routes.Add(
        new ServiceRoute("AdventureWorks", new DataServiceHostFactory(), typeof(AdventureWorks)));
}

Step 5 – Modify the web.config

  1. In AdventureWorks.svc.cs expand #region Sample Config with End-To-End Monitoring enabled”
  2. Select the commented XML and uncomment it (Ctrl+K, Ctrl+U)
  3. Copy it to the clipboard
  4. Comment it again (Ctrl+K, Ctrl+C)
  5. Open web.config
  6. Paste the XML inside the <configuration> tag
  </connectionStrings>
  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    <diagnostics etwProviderId="830b12d1-bb5b-4887-aa3f-ab508fd4c8ba">
      <endToEndTracing propagateActivity="true" messageFlowTracing="true" />
    </diagnostics>
    <behaviors>
      <serviceBehaviors>
        <behavior name="">
          <etwTracking profileName="EndToEndMonitoring Tracking Profile" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="UrlRoutingModule"/>
      <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </modules>
    <handlers>
      <add
      name="UrlRoutingHandler"
      preCondition="integratedMode"
      verb="*" path="UrlRouting.axd"
      type="System.Web.HttpForbiddenHandler, System.Web, 
                      Version=2.0.0.0, Culture=neutral, 
                      PublicKeyToken=b03f5f7f11d50a3a"/>
    </handlers>
  </system.webServer>
</configuration>

Step 6 – Run the Service in IIS

To see the events in Windows Server AppFabric you need to deploy the Web project to IIS or modify your project to host the solution in the local IIS Server.  For this example I’m going to modify the project to host with the local IIS server.  Note: This requires you to run Visual Studio as Administrator

  1. If you are not running Visual Studio as Administrator, exit and restart Visual Studio as Administrator and reload your project.  For more information see Using Visual Studio with IIS 7
  2. Right click on the WebApplication and select properties
  3. Go to the Web tab
  4. Check Use Local IIS Web Server and click Create Virtual Directory
  5. Press Ctrl+Shift+S to save your project settings (Debugging will not save them)
  6. Open AdventureWorks.svc.cs
  7. Press F5 to Debug
  8. The Service will open in the debugger and show the service document 
    Service working
  9. Remove the .svc extension from the URI and try it again.  It will work without the .svc extension in the URI. 

    If this isn’t working for you see System.Web.Routing RouteTable not working with IIS?
    If you want to disable the URI with the .svc extension (and eliminate the .svc file) see this post

  10. If you see an error in the event log (Login failed for user ‘IIS APPPOOL\DefaultAppPool’. Reason: Failed to open the explicitly specified database. [CLIENT: <local machine>]) You need to grant permission to IIS Users to access the database
USE [AdventureWorksLT]
GO
CREATE USER [IIS USERS] FOR LOGIN [BUILTIN\IIS_IUSRS]
GO
USE [AdventureWorksLT]
GO
EXEC sp_addrolemember N'db_datareader', N'IIS USERS'
GO

Step 7 – View Events in AppFabric

  1. Start IIS Manager
  2. Open the AppFabric Dashboard
  3. Click one of the links for WCF
  4. Right click on an event and select View All Related Events to see detailed events

AppFabric Dashboard

 

Tracked Events

AppFabric-enabled WCF Data Service Walkthrough (VB)

AppFabric-enabled WCF Data Service Walkthrough (VB)

In this walkthrough I’ll show you how to use the AppFabric-enabled WCF Data Service (VB) template for Visual Studio 2010 to enhance your WCF Data Services by providing

  • Monitoring events and errors to the AppFabric Data Store
  • Eliminating the need to use the .svc extension in your URI

Requirements

Step 1 – Create a Web Application

  1. Start Visual Studio 2010
  2. Select File / New Project
  3. Choose a Web Application Template – for this example I used Empty Web Application

Step 2 – Add an ADO.NET Entity Data Model

  1. For my database I’m using the AdventureWorksLT sample database for SQL Server 2008R2
  2. Right click on your project and select Add / New Item
  3. Select the ADO.NET Entity Data Model template
  4. Name the model AdventureWorks.edmx
  5. Select Generate From Database
  6. Connect to AdventureWorksLT and use the default settings
  7. Select all the tables by checking the Tables checkbox

Step 3 – Add an AppFabric-enabled WCF Data Service

  1. Right click on your project and select Add / New Item
  2. Select Online Templates
  3. In the search box type AppFabric
  4. Select the AppFabric-enabled WCF Data Service (VB) template
  5. Name it AdventureWorks.svc

    SNAGHTML5e6910
  6. Click Install to install the template on your machine

Step 4 – Modify the template code

We have added TODO tasks in the template to guide you through tasks you need to do to make your service ready

  1. Replace [[class name]] with AdventureWorksLTEntities
  2. Modify the SetEntitySetAccessRule code as shown for all entities (“*”)
  3. If you want to use a different route you can set that as well
    ' This method is called only once to initialize service-wide policies.
    Public Shared Sub InitializeService(ByVal config As DataServiceConfiguration)

        ' Enable read only access to all entities
        config.SetEntitySetAccessRule("*", EntitySetRights.AllRead)
        config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2

        ' TODO: Set your route name
        RouteTable.Routes.Add(
            New ServiceRoute("AdventureWorks", New DataServiceHostFactory(), GetType(AdventureWorks)))
    End Sub

Step 5 – Modify the web.config

  1. In AdventureWorks.svc.vb expand #Region "Sample Config with End-To-End Monitoring enabled"
  2. Select the commented XML and uncomment it (Ctrl+K, Ctrl+U)
  3. Copy it to the clipboard
  4. Comment it again (Ctrl+K, Ctrl+C)
  5. Open web.config
  6. Paste the XML inside the <configuration> tag
  </connectionStrings>
  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
    <diagnostics etwProviderId="830b12d1-bb5b-4887-aa3f-ab508fd4c8ba">
      <endToEndTracing propagateActivity="true" messageFlowTracing="true" />
    </diagnostics>
    <behaviors>
      <serviceBehaviors>
        <behavior name="">
          <etwTracking profileName="EndToEndMonitoring Tracking Profile" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="UrlRoutingModule"/>
      <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </modules>
    <handlers>
      <add
      name="UrlRoutingHandler"
      preCondition="integratedMode"
      verb="*" path="UrlRouting.axd"
      type="System.Web.HttpForbiddenHandler, System.Web, 
                      Version=2.0.0.0, Culture=neutral, 
                      PublicKeyToken=b03f5f7f11d50a3a"/>
    </handlers>
  </system.webServer>
</configuration>

Step 6 – Run the Service in IIS

To see the events in Windows Server AppFabric you need to deploy the Web project to IIS or modify your project to host the solution in the local IIS Server.  For this example I’m going to modify the project to host with the local IIS server.  Note: This requires you to run Visual Studio as Administrator

  1. If you are not running Visual Studio as Administrator, exit and restart Visual Studio as Administrator and reload your project.  For more information see Using Visual Studio with IIS 7
  2. Right click on the WebApplication and select properties
  3. Go to the Web tab
  4. Check Use Local IIS Web Server and click Create Virtual Directory
  5. Press Ctrl+Shift+S to save your project settings (Debugging will not save them)
  6. Open AdventureWorks.svc.cs
  7. Press F5 to Debug
  8. The Service will open in the debugger and show the service document  
    5277.4062.image_5F00_5F00_5F00_2A5316791_5F00_3712F96E[1]
  9. Remove the .svc extension from the URI and try it again.  It will work without the .svc extension in the URI. 

    If this isn’t working for you see System.Web.Routing RouteTable not working with IIS?

    If you want to disable the URI with the .svc extension (and eliminate the .svc file) see this post

  10. If you see an error in the event log (Login failed for user ‘IIS APPPOOL\DefaultAppPool’. Reason: Failed to open the explicitly specified database. [CLIENT: <local machine>]) You need to grant permission to IIS Users to access the database
USE [AdventureWorksLT]
GO
CREATE USER [IIS USERS] FOR LOGIN [BUILTIN\IIS_IUSRS]
GO
USE [AdventureWorksLT]
GO
EXEC sp_addrolemember N'db_datareader', N'IIS USERS'
GO

Step 7 – View Events in AppFabric

  1. Start IIS Manager
  2. Open the AppFabric Dashboard
  3. Click one of the links for WCF
  4. Right click on an event and select View All Related Events to see detailed events

8357.image_5F00_214A114D[1]

5040.image_5F00_2BBABFA0[1]

Silverlight PivotViewer Now Available

Silverlight PivotViewer Now Available

Three months ago at MIX we announced and first demoed the Silverlight PivotViewer control. The Silverlight PivotViewer control enables you to visualize thousands of objects at once, and sort and browse data in a way that helps you see trends and quickly find what you’re looking for. It’s ability to compare information, and navigate it in a way that feels natural and fast, is really unrivaled in the market today. 

PivotViewer is one of those technologies that’s way better experienced than described.  Below are a few cool examples of large information sets published on the web using it with Silverlight 4:

Netflix Instant Watch Movies

This Netflix Instant Watch collection is hosted on Windows Azure and was built by a member of the Windows Azure team. It provides a nice example of how you can use PivotViewer to navigate a large set of information quickly and easily. You can use it to easily find and sort through all your favorite movies, and then navigate directly to the page on Netflix to add it to your instant watch queue.

Browse the site and use the navigation controls on the left to filter and fly through the movies. Then read this post to learn how the site was built with less than 500 lines of code.

image

Hitched Wedding Locations

Hitched is a UK based wedding site that has thousands of wedding venues in the country. It now enables visitors to quickly browse and filter locations using PivotViewer.  Want a big wedding, >300 people?  Must be near London and support overnight accommodations?  No problem – what started as thousands of possibilities ends up quickly finding an optimal location. 

Browse the site and give it a try.

image

PivotViewer Control Now Available for Download

The Silverlight PivotViewer control, along with tools that enable you to easily build your own data collections with it, is now available for download.  You can easily integrate it within your own sites and applications.  Best of all it is completely free.

Below are some resources you can use to get started and learn more:

We think PivotViewer provides an awesome way to visualize data.  The new PivotViewer control for Silverlight, and the tools and samples that ship with it, now makes it really easy for developers and sites to take advantage and use it.  We are looking forward to seeing what you build with it!

Hope this helps,

Scott

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

Make WCF Simpler

Make WCF Simpler

If there is one thing I hear from people over and over again it is this.  Please make WCF simpler, easier to understand and use.  I totally agree with this sentiment.  In fact, in .NET 4 we made it much easier but we still have a long way to go.  Once in a while each of us gets the opportunity to change the world for the better (ok we aren’t solving world hunger here but) If you want your voice to be heard take a minute and fill out this survey.

Welcoming a new citizen to the blogosphere and thinking about “Back-room” programmers

Welcoming a new citizen to the blogosphere and thinking about “Back-room” programmers

During my years in the IT world I’ve been fortunate enough to ton of really intelligent and brilliant people. Many of them have been a joy to speak with and work along side of. However a number of them have been incredibly painful to interact with. I’m sure most of you who have worked in along side “techies” and programmers know what I’m talking about. I’ve always referred to these people as “back-room” programmers.  There are the people who you want to be creating your software and IT systems, but you also want to keep them shut up in the back-room so that they don’t interact with you clients, direct reports, partners or business users.  There are many reasons why we don’t want them to emerge from their back-room solitude.  Some are quick to anger, some are quick to belittle or diminish others, others can’t communicate well. Some of these folks have trouble interacting with others, some are extremely shy while others simply can’t pull themselves out of the technical world long enough to be able to effectively interact with others.  For all of these reasons, we often see these folks left along in a back-room to continue churning out great code/solutions on their own.

Now as brilliant as a back-room programmer may be, they are often limited in their career. Being brilliant isn’t enough to have success in a professional field. We need those soft skills and people skills in order to grow beyond a simple programmer and into an effective IT consultant or team leader. Over the years, I’ve seen many back-room programmers passed over for promotions, public recognition and general career advancement. 

Of course, when people are routinely passed over for advance and feel that they are missing out on the success that others are achieving, resentment sets in. They come up with any number of reasons why they are left behind while others advance. “Some manager doesn’t like them”, “Some manager is stupid and can’t see how brilliant they are”, “so and so over on that team played politics to get their new job”, “so and so over their boast about their accomplishments and therefore got a role they didn’t deserve”. There are any number of reasons why they haven’t achieved the career success that they hoped for, but the sad thing is, they often fail to look at themselves and assess whether or not they are the reason. We need more than simple technical brilliance to achieve in a professional career. We do need all of those great soft skills and people skills. However, above and beyond all of these soft skills, we really need to have a modicum of self awareness. If we aren’t aware of our own needs, wants, limitations, fears, hang-ups, strengths and limitations then we simply can’t expect that we are going to being able to connect well with other people. I achieve career success  (and life success really), we really need to be aware of why we think the way we think, why we act the way that we act and why we think what we do about others. Once we’ve mastered that (although you never really master this), then we can go out and have great personal and working relationships with others. When you combine this with a strong technical expertise and natural talent, then you have the formula for tremendous success.  I often look at new graduates from university and wonder which ones will bring this complete package and which ones will only bring strong technical skills. Its sad really, to see brilliant people trapped in a back-room wasting their talent due to a self imposed lack of self awareness.

Now that I’ve said my piece about that, I also wanted to welcome my wife to the blogosphere. (http://susyfonseca.wordpress.com) There is a connection between my rant today and my welcome message to her. My wife has recently left the IT field (she lead a product development team at a large Telco here) to purse a new career as an art therapist (www.susyfonseca.ca). She’s focused on helping children and adults connect with themselves so that they can realize why they think the way they do and why they act the way they do. I knew nothing about Art Therapy before I met her, but over the years I’ve found it to be a very fascinating discipline. Human minds are conditioned with all kinds of inhibitions and filters which keep our words in check. We often think things that we will never verbally admit. However, the neat thing is, these filters are pretty much only setup to filter verbal communication. When an individual creates art, their true feelings, wants desires, hates and fears will often slip past these filters. When combined with an ongoing discussion with an Art Therapist, this unfiltered art can become a powerful tool for self discovery. It can be used to help an individual discover a ton of great stuff about themselves. This then leads into an ability to interact with others in a healthier and more open way.  This is certainly a program that many of the people I have worked with over the years would have benefited from! (and yes, that includes me :))  Hopefully, this new career will help many many people achieve better success (in the IT field and everywhere else in life).

To wrap up, today’s blog entry certainly wasn’t technically focused, but hey! I have a blog tag for “personal” entries that I have never used. I figured it was time. I’ve been ending my recent blogs with the tagline “stay connected”. Today I’ll expand that a little bit and end with

“Stay Connected (with yourself first!)”

Introducing IIS Express

Introducing IIS Express

Developers today build and test ASP.NET sites and applications using one of two web-servers:

  • The ASP.NET Development Server that comes built-into Visual Studio
  • The IIS Web Server that comes built-into Windows

Both of the above options have their pros and cons, and many ASP.NET developers have told us: “I wish I could have the ease of use of the ASP.NET Development Server, but still have all the power and features of IIS”.  Today I’m happy to announce a new, free option that we are enabling – IIS Express – that combines the best characteristics of both, and which will make it easier to build and run ASP.NET sites and applications.

IIS Express will work with VS 2010 and Visual Web Developer 2010 Express, will run on Windows XP and higher systems, does not require an administrator account, and does not require any code changes to use.  You will be able to take advantage of it with all types of ASP.NET applications, and it enables you to develop using a full IIS 7.x feature-set.

How Things Work Today

Before I get into the details of IIS Express, let’s first quickly review how the ASP.NET Development Server and IIS options work today.

ASP.NET Development Server

Visual Studio’s built-in ASP.NET Development Server (also known as “Cassini”) has the benefit of being light-weight and easy to quickly run.  It doesn’t listen on remote ports (which makes it easier to get approved for many corporate security environments), works even when you are running under a non-administrator account, and doesn’t require a separate installation step. 

The fact that it is so easy to get running is a huge positive of it – and the reason it is the default web-server used by ASP.NET projects in Visual Studio when you press F5 to run them:

image

The downside with the ASP.NET Developer Server, though, is that it does not support a full set of web-server features.  For example, it doesn’t support SSL, URL Rewriting Rules (like the SEO URL Rewrite Rules I blogged about here), Custom Security Settings, and other richer features now offered with IIS 7.

IIS Web Server

IIS is the other option developers use when running and testing their applications with Visual Studio.  You can configure a web project within Visual Studio to use IIS by right-clicking on the project and pulling up its properties (and then by clicking on the “Web” tab within the properties window)":

image

Using IIS as your development server allows you to take full advantage of all web-server features (SSL, URL Rewrite Rules, etc).  IIS is a full-fledged web-server – which means you’ll get an experience closer to what it will work like when you deploy the application on a production server.

The downside with using the IIS option today, though, is that some companies don’t allow full web-servers to be installed on developer machines. IIS also requires administrator account access to setup and debug projects.  Different versions of Windows also support different versions of IIS.  For example, if you are running on Windows XP you have to use the IIS 5.1 web-server that comes with it – which doesn’t support all the new features of IIS 7.x.  Configuring a web project within VS to use IIS also requires some extra installation and configuration steps.

IIS Express – The Best of Both Options

We have been working on a new flavor of IIS 7.x that is optimized for developer scenarios that we are calling “IIS Express”. We think it combines the ease of use of the ASP.NET Web Server with the full power of IIS.  Specifically:

  • It’s lightweight and easy to install (less than 10Mb download and a super quick install)
  • It does not require an administrator account to run/debug applications from Visual Studio
  • It enables a full web-server feature set – including SSL, URL Rewrite, Media Support, and all other IIS 7.x modules
  • It supports and enables the same extensibility model and web.config file settings that IIS 7.x support
  • It can be installed side-by-side with the full IIS web server as well as the ASP.NET Development Server (they do not conflict at all)
  • It works on Windows XP and higher operating systems – giving you a full IIS 7.x developer feature-set on all OS platforms

IIS Express (like the ASP.NET Development Server) can be quickly launched to run a site from a directory on disk.  It does not require any registration/configuration steps. This makes it really easy to launch and run for development scenarios.

VS 2010 Integration

We are enabling IIS Express so that it can be easily used with Visual Studio 2010. You’ll be able to configure VS 2010 to use it instead of the ASP.NET Web Server as the default web-server on ASP.NET Projects.  Like the ASP.NET Development Server today, you won’t need to register a site or virtual directory to use IIS Express. It will support the same usage-model as the ASP.NET Development Server today – just with more feature support.

When you press F5 to run an ASP.NET project, Visual Studio can automatically launch IIS Express and use it to run/debug the application (no extra configuration required).  Like the ASP.NET Web Server, IIS Express will show up in your task-bar tray when running:

image

You can right-click and click “exit” on the icon above to quickly shutdown IIS Express.  You can also right-click and pull up a list of all sites running with it, as well as the directory location and .NET versions they are running under:

image

Two cool things to notice above:

1) The “Test Site” we are running, as well as IIS Express itself, live under the c:\users\[username] folder on disk. This enables non-administrator usage of IIS Express and sites – and enables a bunch of scenarios not possible with the full IIS today (including the ability to run IIS Express in both a locked-down enterprise environment as well as a locked-down school shared computer environment).

2) The “Test Site” we are running above using IIS Express supports both HTTP and HTTPS access.  IIS Express automatically installs a “self-signed certificate” and enables URL ACLs and SSL Certificates for ports so that developers (running as non-administrators on a machine) can use SSL without needing to elevate their accounts or setup any additional configuration.  This enables you to configure secure pages within your applications (like Logon forms) for SSL and run/test them at development time just like they’ll work on your real web-server.

IIS 7.x Feature Set

IIS Express is as easy to run and use as the ASP.NET Web Server you are familiar with today.  But because IIS Express is based on the IIS 7x codebase, you have a full web-server feature-set that you can use.  This means you can build and run your applications just they’ll work on a real production web-server.  In addition to scenarios like SSL, you can take advantage of the IIS 7.x URL Rewriter module, Media Extensions, Dynamic Compression, Advanced Logging, Custom Security and other rich modules now available.

In addition to supporting ASP.NET, IIS Express also supports Classic ASP and other file-types and extensions supported by IIS – which also makes it ideal for sites that combine a variety of different technologies.

Summary

We think IIS Express makes it even easier to build, run and test web applications.  It works with all versions of ASP.NET and supports all ASP.NET application types (including obviously ASP.NET Web Forms and ASP.NET MVC applications).  Best of all – you do not need to change any code to take advantage of it.  You’ll be able to optionally use it with all your current projects today.

We’ll be releasing the first public beta of IIS Express shortly. With the beta you’ll be able to right-click on a file-system folder and have IIS Express launch a web-site based on that file-system location. We’ll also be releasing a patch for VS 2010 and Visual Web Developer 2010 Express later this year that will enable you to automatically launch and use IIS Express in place of VS’s built-in ASP.NET Developer Server.  Future versions of Visual Studio will then ship with this functionality built-in.

Hope this helps,

Scott

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

Leveraging and Managing the StreamInsight Standalone Host

Leveraging and Managing the StreamInsight Standalone Host

In my recent post that addressed the key things that you should know about Microsoft StreamInsight, I mentioned the multiple hosting options that are at your disposal. Most StreamInsight examples (and documentation) that you find demonstrate the “embedded” server option where the custom application that you build hosts the StreamInsight engine in-process. In this post, […]

Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

Patch for Cut/Copy “Insufficient Memory” issue with VS 2010

We’ve received several reports of an occasional issue occurring with VS 2010 when developers try and do “Cut” or “Copy” text operations of text.  In some cases VS incorrectly calculates that not enough memory is available (even though there is memory available) and displays the following error message:

"Insufficient available memory to meet the expected demands of an operation at this time, possibly due to virtual address space fragmentation. Please try again later."

There is now a public patch available for this issue which you can download and apply here if you are running into it.  More details on the issue can be found on the Visual Studio team blog here.

Hope this helps,

Scott

P.S. In addition to blogging, I am also now using Twitter for quick updates and to share links. You can follow me at: twitter.com/scottgu