October 2008 - Posts

Blocked by the Silverlight ManagedRuntimeError 4004

For my Silverlight 2 prototype business app, I wanted to try capturing JSON data from a WCF service and caching it in isolated storage. I found a nice example by Tim Heuer that I updated to the RTW version. After setting up the WCF service on a VPC running Windows Server 2008, I was able to fill the Silverlight datagrid with remote JSON data. Great!, I thought.

The hassles started when I moved the WCF code to a server out on the real Internet. The same Silverlight app on my workstation now throws a 4004 "ManagedRuntimeError" error on startup.

A quick analysis with Fiddler shows the problem. The first thing Silverlight 2 does is look for clientaccesspolicy.xml in the root of the domain. Then, it looks for crossdomain.xml.

image

In my local VPC (webservice2008), I control the root of the domain, so there's no problem putting a clientaccesspolicy.xml in the right location. However, at aspspider I'm just a non-paying tenant with a subdirectory called kjopc. If there's no clientaccesspolicy.xml (or one that denies access), I'm blocked.

The moral of the story is to make sure you've got full control over the Web site and domain before you try serving data up to Silverlight 2. Even when you own the domain, check that the hosting provider supports WCF. I use webhost4life.com for a couple of sites. Their low-end ASP.NET 3.5 plan doesn't include WCF.

Nice Silverlight 2 Business App Design with Source Code

My sense is that Silverlight 2 is going to have a major impact in business applications because of its security, programmability, and ease of deployment. I'm currently working on a prototype for a client who would use the application mainly within the office but who sees a big bonus in allowing employees to log in after hours from any computer to handle emergency/on call tasks.

The best business design example I've seen so far is the Microsoft Health Common User Interface Patient Journey Demonstrator. The source code has been updated to the RTW version of Silverlight 2. This app shows a huge number of techniques including forms, attractive lists, drag 'n' drop, control resizing and search functions.

Unfortunately, the application's sample data comes from static XML files. If the Microsoft Health CUI Team could implement its patient registration form using web services against a real SQL Server database, this would be a spectacular offering.

Expand Silverlight Concept for Cloud Computing?

Given that Silverlight runs on PCs, Macs, and Linux, it isn't a stretch to expand the concept into Cloud computing. Rather than running a stripped-down .NET plug-in within a browser,  what about installing a full-blown, cross-platform runtime?

You'd execute Silverlight Cloud (my term) on your computer (Mac, PC, Linux) and download the cloud-based .xap file from a URI much as you do now with Silverlight 2. Just as the embedded DLLs call into Web services in the browser-based Silverlight, the "big brother" version would exchange its data in the cloud and keep some in the protected storage.

This is kinda like Click Once except that everything runs inside the sandboxed, virtual machine on the local computer. Hmmm. Isn't this starting to sound like, er Java from the old days?

Silverlight 2 will be available for download on Tuesday, Oct. 14

Silverlight 2 will be available for download on Tuesday, Oct. 14, at http://www.microsoft.com/silverlight. Customers already using a previous version of Silverlight will be automatically upgraded to Silverlight 2.

http://www.microsoft.com/presspass/press/2008/oct08/10-13Silverlight2PR.mspx?rss_fdn=Press%20Releases

Tech Ed Online, Tech Days Canada, and Blogging

Gosh, Microsoft has more developer web pages than a person can browse in a month! It's a full-time job trying to keep up with what everyone's doing and saying! How does anyone get any billable work done?

Anyway, I've just been alerted to Tech-Ed Online, a site that offers blogs and conference-level content throughout the year. It's a good idea to push out learning materials via the web because only a few thousand people attend the conferences in person but there are (potentially) millions of developers who want at least some of the information.

The site features a list of world-wide Tech-Ed events (bottom of the page) and resources. Note that Microsoft Tech Days Canada 2008 isn't listed there. There must be some corporate distinction/silo between "Tech-Ed" and  "Tech Days" that excludes our event from the "real" Tech Ed property.

This week, Tech-Ed Online is displaying my mug shot/bio as a spotlighted blogger. Am I risking an infinite loop by writing a blog post about being a featured blogger on Tech·Ed Online Developer that will eventually appear there and link back to this post? <grin>

Review: Advanced ASP.NET AJAX Server Controls For .NET 3.5

Advanced ASP.NET AJAX Server Controls For .NET 3.5 is a fine resource for ASP.NET developers who want to build high performance, data-driven Web applications with a richer user interface. The introduction of ASP.NET AJAX 2.0 extensions caught many of us off-guard. We were suddenly thrown into intensive JavaScript programming on a Microsoft platform. Faced with a major learning curve, many of us fled to the convenience of the UpdatePanel control as a stepping stone.

There's no getting around it, it's going to take effort to get to the next level of AJAX capabilities using Microsoft's library. This book takes you into that journey - but not necessarily by the most direct route.

The first third of the book feels more like a solid ASP.NET AJAX reference than a "how-to-do-it" tutorial. The early chapters cover the library's types, namespaces, and classes in depth. It just seemed too early and too dry to be dealing with the nitty-gritty of the platform.

In my view, the book should start at Chapter Five. That's where you really make use of client-side functionality by adding it to server-based controls. As the authors point out, the AJAX library extensions help you overcome inconsistencies among browsers. You learn practical steps such as adding script resources, configuring ScriptManager, and getting into extender controls. The book leads you through the creation of an Image control extender that loops through a series of images at runtime. It's in this hands-on chapter that you really start to grasp the concepts. There's a substantial chapter of localization in ASP.NET AJAX. If you're taking on a translation, it would certainly be worth the price of the book.

At the outset, I referred to the UpdatePanel. It could be called the "lazy developer's AJAX control". What I learn from Chapter 7 is that the UpdatePanel can be a real headache for control developers. The authors warn of unexpected problems when your carefully-crafted control finds itself inside a partial postback environment.

The book's coverage of the asynchronous consumption of web services is solid. The authors go into all the important acronyms such as REST, and explain WCF from many angles including creating data contracts and service contracts.

In the chapter on Application Services, I discovered how much I didn't know about the client-side use of ASP.NET's Membership, Role, and User Profile services. If these AJAX extensions to the server-side API's escaped you too, you'll really benefit from the chapter.

Every ASP.NET developer knows about the AJAX Control Toolkit but Calderon and Rumerman take it further. They explain the overall architecture and then dig into how you can harness the Toolkit (and especially its animation support) in your own controls.

In summary, this is a very good book for learning to write your own AJAX controls. My main complaint is that the cart comes before the horse... You want to dig into building something interesting (call it 'instant gratification' if you wish) but need to wade through several chapters of dry architectural and reference-type information.

Ken

Weblogs.asp.net and www.asp.net Under New Management

I just learned that our favourite Microsoft community sites (www.asp.net, www.iis.net, www.silverlight.net, and www.windowsclient.net) are under new management. The fabulous people at Telligent are "changing direction to focus more on building and servicing our flagship product: Community Server". So, welcome to Jay Esguerra and the folks at Neudesic who have officially taken over managing the sites today.

I'm a bit nostalgic to see the management change hands at www.asp.net. I remember the early years when the site and code were Rob Howard's personal responsibility. I was in charge of the ASP.NET Control Gallery back then and dealt directly with Rob to get tweaks made to the pages. At that time, Rob's original code was downloadable from the late GotDotNet site.

 

The Joys and Benefits of Being a Microsoft Most Valuable Professional

I've received the Microsoft MVP award for the tenth year in a row! The award brings lots of benefits - tangible and intangible:

  • Microsoft provides a free MSDN subscription 
  • Direct interaction with top guns like ScottGu and the ASP.NET team
  • A worldwide MVP conference at the Microsoft campus in Redmond
  • People recognize you at industry events
  • It's easy to get invitations into Microsoft betas

Another non-Microsoft benefit is free access to some of the best software tools in the industry. Many software vendors provide free licenses to MVPs in their field. Reasons vary, but vendors find that getting their products into the hands of community leaders often creates a 'buzz' or viral networking/marketing that advertising dollars just can't buy. Vendors also get honest, expert feedback because MVPs aren't shy about announcing their likes and dislikes with any product. I haven't named the companies that participate in the not-for-resale (NFR) third-party programme because I don't have their permission. However, think of the top companies in the ASP.NET market and you're going to hit a fair number!

More Posts

Search

Go

This Blog

Web Links

Syndication