VS 2010 RTM, SL4 RTM, .NET 4.0 RTM, WCF RIA/SL4 Toolkit RC2 Migration Story.

I been working for a while on an internal application involving the following technologies.

  • Silverlight 3,
  • .NET 3.5
  • VS 2008,
  • Prism,
  • WCF RIA Service Beta,
  • Silverlight Toolkit (Nov 2009 Release)

Project Statistics:

Here is the content of our VS solution file, quite reasonable sized application.

  • .NET Library Projects : 8
  • WCF RIA Services Project : 4
  • Prism Modules (Silverlight  Application Projects) : 8
  • Silverlight Business Application : 2 (Client and the Server)

First I converted the solution to VS 2010 by just opening the solution file from VS 2010 and navigating through the conversion wizard. No errors encountered during the migration. But obviously the solution didn’t compile for few reasons. Majority of the errors were mainly due to 2 references

  • System.ComponentModel.DataAnnotation, and
  • System.Web.DomainService

I changed the target framework setting in all the .NET Library projects to ".NET Framework 4.0", and fixed the System.ComponentModel.DataAnnotation reference.

RIA Services Changes:

Server Side: Removed the following references from the server side (RIA services) project

  • System.Web.DomainServices
  • System.Web.Ria

and added the following new references

  • System.ServiceModel.DomainServices.Server.dll
  • System.ServiceModel.DomainServices.Hosting.dll

which can be found under c:\Program Files\Microsoft SDKs\RIA Services\v1.0\Libraries\Server\.

Client Side: Removed the following references from the client side (Silverlight Application) project

  • System.Windows.Ria

and added the following new references

  • System.ServiceModel.DomainServices.Client.dll
  • System.ServiceModel.DomainServices.Client.Web.dll

In addition to the above RIA dll’s you also need to add reference to System.ServiceModel.Web.Extensions.dll (found under c:\Program Files\Microsoft SDKs\Silverlight\v4.0\Libraries\Client).

On both the server and client projects you need to correct the "using" statements in all the source files.

RIA Services Link Not Visible:

By default after the conversion your WCF RIA Client projects will still remain on "Silverlight 3" target settings. WCF RIA services is not supported on Silverlight 3 and hence you won’t see any option to configure the  "WCF RIA Services Link" in the properties windows.  Change the "Target Silverlight Version" to Silverlight 4 and you’ll see the option to select the RIA services link.

Option to copy xap files (PRISM Modules) to ClientBin folder was broken

The xap files were not automatically copied to the ClientBin folder (as part of build process) after the migration. I had to reconfigure it by going to Properties (In the Web – Server side project) and selecting Silverlight Applications tab.

Silverlight Toolkit Changes:

Remove the existing references for older version of Toolkit and add the following from the .NET list

  • System.Windows.Controls.Toolkit

Silverlight Business Application Template Changes:

This was the biggest challenge for me and took considerable amount of time. At the end, I couldn’t fix the existing solution, so recreated a standalone project using the new template and added the files from the previous solution.

Busy Indicator:

The Silverlight Business Application template uses its own version of BusyIndicator (source included) instead of the one from ToolKit, which resulted in some conflicts. I deleted the files under Control (BusyIndicator.*), removed the references and configured to use the one from Toolkit. Beware you need to comment the lines in Style.xaml.

Note:

After the upgrade there is no choice for you to go back to VS 2008. If you are using WCF RIA RC2 then the only choice is VS 2010, SL 4.

Nandri!

Saravana

Silverlight 4 Released

Silverlight 4 Released

The final release of Silverlight 4 is 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]

What is in the Silverlight 4 Release

Silverlight 4 contains a ton of new features and capabilities.  In particular we focused on three scenarios with this release:

  • Further enhancing media support
  • Building great business applications
  • Enabling out of the browser experiences

On Tuesday I gave a 60 minute keynote about Silverlight 4 which showed off many of the new features and capabilities now available.  You can watch my keynote to learn more about Silverlight 4 and see a ton of great demos of it in action.

Also check out these three great posts by Tim Heuer that talk about the new features and provide a guide to the new Silverlight 4 capabilities:

Also read David Anson’s great Silverlight 4 Toolkit post to learn more about the new controls and functionality also available within the Silverlight Toolkit release we also made available today.  Visit this page to learn more about the new Pivot functionality in Silverlight 4 – which makes it really easy to visualize and interact with collections of images using Silverlight.

Lastly – make sure to visit the www.silverlight.net web-site and visit the “Get Started” section to find free tutorials that you can use.

Download and Install Silverlight 4 Tools for VS 2010

To develop Silverlight 4 applications you should first download and install Visual Studio 2010 or download and install the free Visual Web Developer 2010 Express edition.

Then install the Silverlight Tools RC2 for Visual Studio 2010.  This setup includes the Silverlight 4 Developer Runtime, Silverlight 4 SDK, RIA Services, and VS 2010 tools support.  Once installed you can do File->New Project and choose Silverlight Application to create your first Silverlight 4 project.  You can then use the new WYSIWYG Silverlight designer in Visual Studio 2010 to design and build rich Silverlight 4 applications.

image

Important: If you previously installed the Silverlight 4 Beta or RC build on your machine, please make sure to go into Add/Remove programs and uninstall the “Update for Visual Studio 2010 (KB976272)” package prior to installing the Silverlight Tools RC2 for Visual Studio 2010 setup. 

Note that while Silverlight 4 is released, the “Silverlight 4 Tools for VS 2010” is currently in “RC2” mode (meaning we are going to keep an eye out for any remaining issues before finally calling it done).  We’ll update the tools to be “final” in a few weeks once we verify that no last minute issues/bugs remain. 

Download and Install Expression Blend 4 Release Candidate

You can also download and install the Expression Blend 4 RC to create and design great Silverlight 4 applications. 

Blend contains “Sketchflow” support – which makes it really easy to rapidly prototype ideas and applications.  To learn more about Sketchflow watch this 90 second video of it in action.

Summary

Today’s release is the fourth release of Silverlight that we’ve shipped in the last 2.5 years.  The team has done a great job of advancing it quickly and staying focused. 

Today’s Silverlight 4 release opens up a ton of new opportunities to build great solutions for both consumers and business scenarios.  We are looking forward to seeing what you build with it!

Hope this helps,

Scott

Send Failures, NACKS and SOAP Faults

(or why my previous post doesn’t apply to all adapters)

In a previous post I identified how if you had the WCF-BasicHttp adapter on the backend send and the WCF-NetTcp adapter on the frontend receive you need a transformation for the client to interpret the backend Fault as a Fault since there is a SOAP version mismatch.

As was evident by a comment, this does not apply to all adapters, but only to the base WCF adapters. for example it does not work with the WCF-SQL adapter.

Why?

In contrast to the base WCF adapters, which when you enable the Propagate fault message treats a SOAP Fault coming from the recipient service as an acceptable message and returns it to the receive port as a valid SOAP Fault message that has Fault as the root element, the WCF-SQL adapter returns a NACK message (if there is an error raised in SQL) as the message. The NACK message has not got the Fault element as it’s root, but instead has Envelope, and looks like this:

<?xml version="1.0" encoding="utf-8"?>
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <SOAP:Body>
    <SOAP:Fault>
      <faultcode>Microsoft BizTalk Server Negative Acknowledgment </faultcode>
      <faultstring>An error occurred while processing the message, refer to the details section for more information </faultstring>
      <faultactor>C:\Projects\Sample\Locations\Response\FM_%MessageID%.xml</faultactor>
      <detail>
        <ns0:NACK Type="NACK" xmlns:ns0="http://schema.microsoft.com/BizTalk/2003/NACKMessage.xsd">
          <NAckID>{FFB1A60B-E593-4620-8897-4E9C7030A937}</NAckID>
          <ErrorCode>0xc0c01658</ErrorCode>
          <ErrorCategory>0</ErrorCategory>
          <ErrorDescription>There was a failure executing the send pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLTransmit, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML assembler" Send Port: "Failed Message" URI: "C:\Projects\Sample\Locations\Response\FM_%MessageID%.xml" Reason: This Assembler cannot retrieve a document specification using this type: "http://Sample#Unknown".  </ErrorDescription>
        </ns0:NACK>
      </detail>
    </SOAP:Fault>
  </SOAP:Body>
</SOAP:Envelope>

Therefore it cannot be mapped by the map presented in that post, although the Fault it contains is a SOAP 1.1 Fault.

Read more about ACK and NACK messages here.

SBUG Session: The Enterprise Cache

[Source: http://geekswithblogs.net/EltonStoneman]

I did a session on “The Enterprise Cache” at the UK SOA/BPM User Group yesterday which generated some useful discussion. The proposal was for a dedicated caching layer which all app servers and service providers can hook into, sharing resources and common data. The architecture might end up like this:

I’ll update this post with a link to the slide deck once it’s available.

The next session will have Udi Dahan walking through nServiceBus, register on EventBrite if you want to come along.

Synopsis

  • Looked at the benefits and drawbacks of app-centric isolated caches, compared to an enterprise-wide shared cache running on dedicated nodes;
  • Suggested issues and risks around caching including staleness of data, resource usage, performance and testing;
  • Walked through a generic service cache implemented as a WCF behaviour – suitable for IIS- or BizTalk-hosted services – which I’ll be releasing on CodePlex shortly;
  • Listed common options for cache providers and their offerings.

Discussion

Cache usage. Different value propositions for utilising the cache: improved performance, isolation from underlying systems (e.g. service output caching can have a TTL large enough to cover downtime), reduced resource impact – CPU, memory, SQL and cost (e.g. caching results of paid-for services).

Dedicated cache nodes. Preferred over in-host caching provided latency is acceptable. Depending on cache provider, can offer easy scalability and global replication so cache clients always use local nodes. Restriction of AppFabric Caching to Windows Server 2008 not viewed as a concern.

Security. Limited security model in most cache providers. Options for securing cache content suggested as custom implementations. Obfuscating keys and serialized values may mean additional security is not needed. Depending on security requirements and architecture, can ensure cache servers only accessible to cache clients via IPsec.

Staleness. Generally thought to be an overrated problem. Thinking in line with eventual consistency, that serving up stale data may not be a significant issue. Good technical arguments support this, although I suspect business users will be harder to persuade.

Providers. Positive feedback for AppFabric Caching – speed, configurability and richness of the distributed model making it a good enterprise choice. .NET port of memcached well thought of for performance but lack of replication makes it less suitable for these shared scenarios. Replicated fork – repcached – untried and less active than memcached. NCache also well thought of, but Express version too limited for enterprise scenarios, and commercial versions look costly compared to AppFabric.

I want to hit Apex SQL with a big stick

<Whinge>

Thought id just have a little whinge about this product which caused me a load of grief the other day…..

So the background was that my development machine had a completely full hard disk which I needed to sort out. Upon investigation I found the issue was that the msdb database had managed to get very large.

This was caused because a long time ago (and I cant even remember why) I tried out Apex SQL. After a few days I decided to uninstall it and thought nothing more of it. What I didnt realise was that uninstalling it doesnt actually uninstall it (and it doesnt inform you about this), but there was still some assemblies left on my machine. Everytime SQL Server was running it was starting the Apex SQL Connection monitor which was then running in the background and regularly recording information in the msdb database. Over time it had recorded enough to fill the disk.

The below article advises how to sort this out by removing this fully so if your having a problem then try this out:http://knowledgebase.apexsql.com/2007/08/how-to-uninstall-apexsqlconnectionmonit_09.htm

Once this was sorted out its interesting to read the above article because I just dont think the approach used by the vendor of this software is a very good one. So for the Apex team just wanted to pass on a thought:

If I want to uninstall your product you should tell me if stuff is left on the machine especially if a process will be running which is going to fill my machine with useless data,

</Whinge>

Real World AppFabric: Interview with Richard Prodger, Technical Director at Active Web Solutions

We talked to Richard Prodger, Technical Director at Active Web Solutions (AWS), about using the Windows Azure platform to deliver the company’s search-and-rescue application and the benefits that Windows Azure platform AppFabric provides. Here’s what he had to say:


 


MSDN: Tell us about Active Web Solutions and the services you offer.


Prodger: AWS specializes in Web application and custom software development. In 2006, the Royal National Lifeboat Institution contracted AWS to build an automated alerting system for fishing vessels in the United Kingdom. We developed a location-based service infrastructure, code-named GeoPoint, that transmits position data to a centralized tracking and alerting system. We then used GeoPoint to build MOB Guardian, a search-and-rescue application for fishing vessels (MOB stands for “man overboard”).


 


MSDN: What was the biggest challenge Active Web Solutions faced with GeoPoint and MOB Guardian before migrating to the Windows Azure platform?


Prodger: Our original infrastructure could handle approximately 10,000 boats, but we wanted to offer MOB Guardian to the 500,000 leisure craft in the U.K. and the millions of marine users worldwide. However, as a small company, we would find it hard to accommodate the massive infrastructure that would be required to offer MOB Guardian more broadly.


 


MSDN: Can you describe the solution you built with Windows Azure and Windows Azure platform AppFabric to help address your need for a cost-effective, scalable solution?


Prodger: We migrated our existing application to Windows Azure very quickly. Now, instead of passing emergency messages by satellite to physical servers, messages are transferred by satellite using the Simple Mail Transfer Protocol (SMTP) and delivered to a number of message queues. Multiple service instances read from the queues, process the messages, and store the data using Table storage in Windows Azure. Emergency alarms are then relayed through the AppFabric Service Bus to the end-user monitoring application in the search-and-rescue operations center. We also used the AppFabric Service Bus to connect cloud-based GeoPoint to on-premises databases without exposing the data to the public Internet.


 



 


MSDN: What makes your solution unique?


Prodger: In the waters surrounding the United Kingdom, an estimated 350 fishing crew lost their lives at sea between 1996 and 2007. However, in our first 18 months of operation, MOB Guardian helped to save nine lives. Our original architecture supported 10,000 vessels, but with Windows Azure and AppFabric, we can support hundreds of thousands or even millions of vessels, without any capital expenses, and help save more lives.


 


MSDN: Are you offering MOB Guardian to any new customer segments or niche markets? 


Prodger: By using the Windows Azure platform, we’ve been able to transform the original fishing vessel-focused MOB Guardian application into a broader geolocation services platform that has more extensive capabilities and can be marketed to many more customers. There are also new market opportunities for GeoPoint where pleasure sailors might access GeoPoint from Facebook, for example, to see a map of where they’ve been or to log their trip once they get home. With AppFabric Access Control, we wouldn’t have to force users to create another set of authentication credentials; they could use their Facebook credentials as their GeoPoint ID.


 


MSDN: What are some of the key benefits Active Web Solutions has seen since migrating to the Windows Azure platform?


Prodger: The ability to scale up without capital expenditures is key. To scale, we simply provision more computing capacity and add more message queues from the Windows Azure platform Web portal. With AppFabric Service Bus, we can manage requests and message volumes globally with massive scale. We’re also able to avoid additional IT staffing costs because Microsoft handles all operating system updates and upgrades, which occur without downtime. In addition, we slashed development time and costs-Windows Azure saved us three to six months of development effort.


 


Read the full story at:


http://www.microsoft.com/casestudies/Case_Study_Detail.aspx?CaseStudyID=4000005892


Read more AppFabric customer success stories, visit:
http://www.microsoft.com/windowsazure/evidence/appfabric/