Category Archives: microsoft

Microsoft releases Visual Studio LightSwitch: a fascinating product with an uncertain future

Microsoft has released Visual Studio LightSwitch, a rapid application builder for data-centric applications.

image

LightSwitch builds Silverlight applications, which may seem strange bearing in mind that the future of Silverlight has been hotly debated since its lack of emphasis at the 2010 Professional Developers Conference. The explanation is either that Silverlight – or some close variant of Silverlight – has a more important future role than has yet been revealed; or that the developer division invented LightSwitch before Microsoft’s strategy shifted.

Either way, note that LightSwitch is a model-driven tool that is inherently well-suited to modification for different output types. If LightSwitch survives to version two, it would not surprise me to see other application targets appear. HTML 5 would make sense, as would Windows Phone.

So LightSwitch generates Silverlight applications, but they do not run on Windows Phone 7 which has Silverlight as its development platform? That is correct, and yes it does seem odd. I will give you the official line on this, which is that LightSwitch is not aimed primarily at developers, but is for business users who run Windows and who want a quick and easy way to build database applications. They will not care or even, supposedly, realise that they are building Silverlight apps.

I do not believe this is the whole story. It seems to me that either LightSwitch is a historical accident that will soon be quietly forgotten; or it is version one of a strategic product that will build multi-tier database applications, where the server is either Azure or on-premise, and the client any Windows device from phone to PC. Silverlight is ideal for this, with its modern presentation language (XAML), its sandboxed security, and its easy deployment. This last point is critical as we move into the app store era.

LightSwitch could be strategic then, or it could be a Microsoft muddle, since the official marketing line is unconvincing. I have spent considerable time with the beta and doubt that the supposed target market will get on with it well. Developers will also have a challenge, since the documentation is, apparently deliberately, incomplete when it comes to writing code. There is no complete reference, just lots of how-to examples that might or might not cover what you wish to achieve.

Nevertheless, there are flashes of brilliance in LightSwitch and I hope, perhaps vainly, that it does not get crushed under Microsoft’s HTML 5 steamroller. I set out some of its interesting features in a post nearly a year ago.

Put aside for a moment concerns about Silverlight and about Microsoft’s marketing strategy. The truth is that Microsoft is doing innovative work with database tools, not only in LightSwitch with its model-driven development but also in the SQL Server database projects and “Juneau” tools coming up for “Denali”, SQL Server 2011, which I covered briefly elsewhere. LightSwitch deserves a close look, even it is not clear yet why you would want actually to use it.

image

Living in an App Store world: what are the implications?

A few recent events prompt some reflections on the rise of app stores and the implications for developers and for the IT industry.

One is Apple’s OS X Lion release, available only through the Mac App Store; and the removal of the optical drive on the Mac Mini, making it hard to install shrink-wrap software.

Another is Adobe’s closure of its InMarket service and AIR Marketplace app store. Some app stores are doing better than others.

A third is TechCrunch reporting that book apps such as Nook and Kindle are being hobbled or removed from the Apple iOS store. While I cannot verify this at the moment – I still see the Kindle app in the store, and it still has a link to the Kindle web store – it is in tune with Apple’s announcement in February:

… publishers may no longer provide links in their apps (to a web site, for example) which allow the customer to purchase content or subscriptions outside of the app.

Enforcing this on an app such as Kindle promotes Apple’s own iBooks app and store.

There are lots of app stores out there, though one fewer with the forthcoming closure of AIR Marketplace, but how many of them matter? Here is my pick of the top three:

  • Apple iOS and Mac App Store – arguably two different stores, but since you access them with the same account I bracket them together.
  • Google Android Market – not a lock-in like Apple’s store, but still the primary store for Android.
  • Windows vNext marketplace – how this will work is not yet public, but the existence of a new app store in Windows 8 is widely rumoured and might be expected to tie in with what is already in place for Windows Phone 7.

Perhaps I am overstating the importance of the Windows 8 marketplace, given the failure of the Windows Vista marketplace, but given that Apple has now shown the way I find it hard to see how Microsoft can fail with this one.

Note that an app store is not just a marketing ploy. It is a software deployment and update tool.

App Stores score well in terms of usability. Another advantage is that users have a centralised mechanism for software updates, managed by the operating system. That is good for security, because it is unlikely to be disabled, and good for usability as it should mean fewer third-party updaters like those from Adobe, Oracle Java, Symantec and others.

App Stores typically enforce certain conditions on developers. In essence they must be well-behaved. For examples, the Mac App Store prohibits apps that request escalation to root privileges. Apple also rejects apps that use “deprecated or optionally installed technologies”, including specifically Java and by implication Adobe Flash or other runtimes.

This is great for security. In principle, if you decide that you will only install apps from the App Store, you can be confident that all your apps are well-behaved. On the Mac this is interesting; on Windows it would be a revolution.

What are the business implications though?

  • First, it is a significant source of new revenue for the operating system vendor. It gets a cut of everything.
  • Second, it gives tremendous empowerment to user ratings and reviews. On iOS or Android, if you want an app, you automatically search the app store and take note of factors such as user ratings and popularity. Most of us can figure that if there are few ratings or reviews, the app is not popular.

If you are a software company, getting high ratings and good reviews on app stores is now a key challenge, even more so than it is already with the likes of Amazon.

  • Speaking of Amazon, the third point is that app stores will not be welcomed by software resellers. They are simply being bypassed. Amazon is addressing this with its own App Store for Android; but can it really win against the official Google Android Market? Its MP3 store is better value than Apple’s iTunes, but has smaller market share.

Amazon has other business to fall back on, but specialist software resellers will be watching the growth of app stores nervously. Apple resellers in general are already hurting and diversifying, thanks in part to Apple bypassing them with releases like OS X Lion.

The app store revolution is good for users in many ways, especially as prices seem to end up lower than before, but there are worrying aspects. In particular, the ability of the operating system vendor to tilt the store in its own favour is a concern, and we will hear more complaints about that.

Finally, it is interesting to speculate how this may impact enterprise software deployment. Will Microsoft aim to link its forthcoming Windows app store to other deployment mechanisms such as System Center Configuration Manager? What about volume licensing sales, will resellers be able to keep hold of those? Maybe we will learn more of Microsoft’s story on this at the Build conference in September.

Microsoft financials: Office and server dominate as Windows falters

Microsoft has released its quarterly figures for January-March 2011. My at-a-glance summary is below.

Quarter ending June 30th 2011 vs quarter ending June 30th 2010, $millions

Segment Revenue Change Profit Change
Client (Windows + Live) 4740 -41 2943 -123
Server and Tools 4643 +494 1774 +214
Online 662 +94 -728 -40
Business (Office) 5777 +402 3618 +399
Entertainment and devices 1485 +341 32 +204

Business as usual? More or less, but there are a few points to note.

The figure that jumps out is the stunning performance of Office, which includes SharePoint and Exchange. Why is everyone buying Office 2010, when a document like the one I am typing now could be done just as well in Word 2.0 from 1991, or more plausibly the free OpenOffice?

The answer is the Microsoft has successfully transitioned many of its customers to using Office with SharePoint and Exchange, making it harder to stick with old versions and selling CALs (Client Access Licences) as well as the Office suite itself. This is highly profitable, though the aspect that puzzles me is that Office 365, which is cloud-hosted SharePoint and Exchange, is more cost-effective for the customer since it includes server software, CALs and in some cases the Office client for a commodity-priced subscription.

In other words, I find it hard to see how Microsoft can remain equally profitable if a significant proportion of its customers switch to Office 365. The company may be depending on its ability to upsell those customers to further online services; or perhaps it has not fully thought this through and has set Office 365 pricing at what it needs to be in order to compete with Google.

Fortunately for Microsoft, there is enough doubt concerning the safety of cloud services to sustain continued strong sales of on-premise solutions.

Second notable thing: Windows is in decline. The reason: it is losing market share to Apple and to Google Android. Netbook sales are down 41% according to the release, and I would guess that those sales have mostly gone to Apple iPad and Android tablets rather than to Windows notebooks.

Will Windows 8 reverse the decline? Speculation of course, but it will not repeat the success of Windows 7. In fact, my guess is that Windows 8 will be a hard sell to enterprises which have finally been persuaded to migrate from Windows XP. They are settling down for another five years of stability. Windows 7 was a consolidation release, just the sort of thing enterprises like. Windows 8 will be a revolution release, with most of the interest focused on what it can do in mobile and tablets. If it does succeed, it will do so slowly; there will be no rush to upgrade from 7 other than from the usual early adopters. It may improve sales in the consumer market, but neither Mac nor iPad nor Android is going away.

That leads on to mobile, the figures for which are buried under a pile of Xbox consoles. A good quarter for Xbox, though note how poor the margins are compared to those for Office or Windows.

Finally, the online money drain continues. Note that this is Bing and online advertising, not Azure or Office 365. Microsoft must feel that it the strategic value of these online services is worth the cost, particularly since they tie into mobile and the ecosystem which Nokia is depending on for a reversal of its fortunes. Given that the company has money to burn, there may actually be some sense in that; though for a segment to make such large and consistent losses over a long period has to be a concern.

Wolfram announces Computable Document Format for interactive docs

Wolfram has announced the Computable Document Format (CDF), a document format that enables live computation to be embedded within it. “It’s a new way to communicate the world’s quantitative ideas much more richly than we have in the past, and in doing that a new kind of active document,” says  Conrad Wolfram, Strategic Director of Wolfram Research. That said, the technology here is not really new. There is a close relationship between CDF and Mathematica, Wollfram’s tool for creating mathematical calculations and simulations. The authoring tool for CDF is Mathematica:

image 

The announcement then is really about a new player for Mathematica content and applications, to broaden their usage. The CDF player is free, though there are some limitations. If you charge for your document, or want to display it without the player chrome, then a paid licence is needed. A CDF document can also be compiled into a standalone executable, blurring the distinction between document and application.

The CDF player is available for Mac, Windows and Linux. There is also a browser plug-in for embedding CDF documents into web pages.

It is easy to find use cases for CDF. It is for documents where there is value in performing calculations or interacting with data within the page. An example is pension planning:

image

We have all seen those documents with a series of projections based on different assumptions about retirement age, contributions, investment growth and so on. This works better as an interactive chart where you can enter whatever values you like.

Other examples are statistical analysis and business intelligence, textbooks and course books where students can interact with equations and simulations, business proposals where you want to show how financial projections change based on different assumptions, or even general news reports where instead of a static chart you might want to show interactive graphics that let readers drill down into the data that interests them, or see real-time results.

Along with the computation engine, CDF supports a decent range of traditional content formatting features including cascading stylesheets.

Wolfram is correct in assuming that this kind of interactive document is important, and something we will increasingly take for granted in the era of the Web, eBooks and tablets. But can it succeed in establishing its own new document format when we already have HTML, Adobe PDF and Flash, Microsoft Excel and PowerPoint, and other formats which are also capable of embedded interactive content?

That is a key question. Wolfram offers a table which claims to show the benefits of CDF versus competitors such as HTML and PDF, but it is as skewed as these tables usually are. Wolfram says a PDF document cannot be compiled as a standalone executable, for example, but a PDF in an Adobe AIR application comes close. It is also worth noting that you can embed Flash in PDF, which would be an obvious route to something like the pension planning document mentioned above.

Nevertheless, CDF does have advantages. In particular, it has Mathematica, and whereas authoring a Flash applet requires programming and design skills, Mathematica is more approachable presuming you have the necessary mathematical, scientific or financial skills; and if you do not, you should not be authoring the document. Mathematica will construct a user interface automatically. It also has a huge range of built-in algorithms, functions and charts. Wolfram claims that authoring a CDF should be within reach of anyone who can work with an Excel macro.

The challenge Wolfram faces is how to make CDF usable across a broad range of devices and clients. Having to install a player or plug-in is a considerable deterrent. PDF or better still HTML5 has broader reach and works on Google Android and Apple iOS as well as on desktop PCs.

I tried the CDF plugin and player on Windows 7 and encountered several issues. The plug-in does not play nicely with Internet Explorer’s Protected mode and I saw this dialog frequently:

image

I also had some issues with the player. I could not get an example document on Gulf Oil Spill Estimation to work:

image

The player is currently for Windows, Mac and Linux – what about Apple iOS? Wolfram says it is working on this, with a two-pronged approach. One idea is presumably based on some sort of app, I’d guess either a player if Apple allows it, or some way to compile a CDF into an app. The other idea is to render the interactive parts server-side, so you could use them in a web page without a plug-in. This second idea could also remove the need for a plug-in on the desktop. You will get a performance hit because of all those trips back and forth to the server, but this could be mitigated by high performance computing on the server that will perform calculations more quickly than your client.

I can see CDF being popular within its niche, but whether it can transition into being a mass-market format I am not sure. Established plug-ins and runtimes such as Adobe Flash, Microsoft Silverlight, and Java on the client are all under pressure, particularly as Apple’s iOS spreads its reach; it is not a good moment to launch a new format that has a plug-in or runtime dependency. I wonder if Wolfram is exploring the possibility of compilation to HTML5 and JavaScript?

Despite these reservations, the broader vision behind CDF seems to me spot-on. There are many cases where we currently see static charts, that would be better served by an embedded computation engine.

The strategy behind Mono has shifted: ten years of open source .NET

Yesterday, SUSE and Xamarin announced, in effect, the transfer of all things Mono to Xamarin.

The agreement grants Xamarin a broad, perpetual license to all intellectual property covering Mono, MonoTouch, Mono for Android and Mono Tools for Visual Studio. Xamarin will also provide technical support to SUSE customers using Mono-based products, and assume stewardship of the Mono open source community project.

Xamarin is a startup formed by Mono founder Miguel de Icaza following the acquisition of Novell and SUSE by Attachmate, which ceased Mono development.

Attachmate acquired Novell in November 2010. Mono has been plucked from the abyss with impressive speed.

That said, the strategy behind Mono has shifted. Mono exists because de Icaza liked what Microsoft announced back in 2000 when it introduced C# and the .NET Framework. Microsoft made a show of standardizing the .NET CLI (Common Language Infrastructure), which made PR sense at the time since there was controversy over Sun’s ownership of Java, though nobody really believed that Microsoft knew how to steward an open source development platform or indeed believed that it was really serious about it. History largely justifies that scepticism; but de Icaza called Microsoft’s bluff and forged ahead with Mono, implementing not only the CLI and C# but most of the .NET Framework as well.

The goal of Mono, as I recall, was to bring the benefits of C# and .NET to Linux developers, and to enable developers to move applications freely between Windows and Linux. Apple OS X was also on the radar, though it took longer to become much use. Recalling Mono’s early days, de Icaza said:

Mono to me is a means to an end: a technology to help Linux succeed on the desktop.

Mono worked remarkably well from quite early on, but never quite well enough to persuade mainstream developers it was a sensible choice for applications that would otherwise have run on Windows. It did emerge as a viable and productive toolset and platform for Linux and a number of Mono applications became popular, including Beagle search, Tomboy notes, and F-Spot photo management. Some ASP.NET applications run on Mono; I have one on this site. Another Mono success was its use as the scripting engine in Unity, a game development platform.

A big problem for Mono though was the lack of a business model. There was support and servicing of course, which must have generated some revenue for Novell, but most Mono use is free. Novell possibly had in mind that Mono could be significant as an application server, but it has never become a really trusted platform in the Enterprise. For example, as Alan Radding (Dancing Dinosaur) notes:

DancingDinosaur has not found any SUSE on z user that has successfully implemented .NET apps on the mainframe. A few have tried but reported that Mono on z wasn’t ready for prime time.

Even among the free software and open source community, Mono was hampered by suspicion of Microsoft. If Mono became successful enough to threaten Microsoft, would lawyers appear? Given the way Microsoft is currently behaving with Android, filing legal actions and signing up licensees, those fears might not be unwarranted.

So what is Mono today? The answer is that Mono is now primarily a mobile platform. The Xamarin home page makes this clear, as well as making it apparent that the Mono team has discovered the value of a business model:

image

Xamarin is tapping into two real business needs. One is the need for a cross-platform mobile development platform that works. The second is a way for Windows developers to use their existing C# skills for mobile development, given that they might not be happy with the tiny market share currently achieved by Windows Phone 7.

When I had a quick try with Monotouch I was impressed, and I would like to spend some more time with it and with Mono for Android.

Mono has touch competition though. In particular, PhoneGap, Appcelerator’s Titanium, and Adobe AIR. I was interested to see that Adobe is coming up with a packager for AIR on Android, which may significantly improve it as a cross-platform mobile toolkit.

Still, Xamarin is small and nimble and I expect it to succeed. It has also has Visual Studio integration, which is an advantage. One of the pieces Xamarin has now licensed from SUSE is Mono for Visual Studio.

The downside of these latest developments is that if you depend on Mono for the desktop or for ASP.NET, you may find these parts of the Mono project getting little attention from the new company. But Mobile is all that matters now, right?

I write this on July 19 2011. According to Wikipedia:

Recognizing that their small team could not expect to build and support a full product, they launched the Mono open source project, on July 19, 2001 at the O’Reilly conference.

Well, if there was a launch there it was low-key. It is not mentioned in this report. But de Icaza does recall:

We planned the announcement to come by July 19th 2001, so we could announce this at the O’Reilly conference, as Tim O’Reilly had been very supportive of this effort, and had offered his help since the early stages, when it was still a very young idea. When we announced the project launch we had our team in place, and we were shipping our metadata framework and our C# compiler as well as a few initial classes So officially the Mono project was launched on that date, but it had been brewing for a very long time.

Happy Anniversary!

SQL Server 2011 Denali publishes tables as Windows network folders

I’ve been testing the new Community Tech Preview of SQL Server 2011, codenamed “Denali”.

Here is an intriguing feature. You can now create a new kind of table called a FileTable. A FileTable is mapped to a folder on the filesystem, though you are not meant to access it directly once it is managed by SQL Server. However, you can access the folder in Windows Explorer, or over the network, as a network share. When you do this, a SQL Server component intercepts the Windows API calls and updates the FileTable. FileTables build on the existing FILESTREAM feature in SQL Server 2008, and the documents in the folder are stored as FILESTREAM data.

The illustration shows a folder in Windows Explorer that is also a SQL Server FileTable.

image

Is this the return of WinFS, the fabled relational file system which was originally planned for Windows Longhorn, but abandoned? Not really. According to the docs:

FileTables remove a significant barrier to the use of SQL Server for the storage and management of unstructured data that is currently residing as files on file servers. Enterprises can move this data from file servers into FileTables to take advantage of integrated administration and services provided by SQL Server. At the same time, they can maintain Windows application compatibility for their existing Windows applications that see this data as files in the file system.

Microsoft partners are not whooping and cheering for Office 365

There is a telling moment in the day two keynote at Microsoft’s Worldwide Partner Conference. “Now we’ve added Office 365”, says Corporate VP Jon Roskill. Do you guys feel the momentum?” There is a muted cheer, not the big whoop Roskill is looking for. “Now let’s have some momentum, whoo!” he repeats. Another barely audible cheer.

Why are partners not whooping and cheering?  Take a look at the Microsoft-commissioned Forrester report [PDF] on the total economic impact of Office 365. This report claims a remarkable payback period of only 2 months for a midsize organization moving to Office 365.

Looking at the figures in more detail, Forrester claims $54,000 saved over three years in eliminated hardware, $10,000 over the period in eliminated third-party software, $25,000 saved in web conferencing (Lync Online is bundled with Office 365), and $18,000 in “internal labor and professional services” saved on planning and implementation. There is an even bigger saving in support. Here I find it hard to puzzle out exactly what Forrester is claiming. It talks about “savings of $206,350 over three years” from simplified support and outsourced administration of infrastructure, but also refers to $146,250 costs in admin and support costs for Office 365; I am not sure if the $206,350 is a net figure. Forrester also throws in $260,625 saved on reduced travel thanks to online collaboration, which strikes me as highly speculative.

I suggest therefore that you do not take Forrester’s figures too seriously; but it is still worth noting that many of the savings come from revenue that would otherwise have gone to partners. How much partner income is lost will depend on the extent to which an organization outsources its IT admin, planning, support and administration, and on the margins partners achieve on things like third-party software; but it is considerable.

Of course there are also new business opportunities for partners. Presuming the savings from Office 365 and Microsoft’s other cloud offerings are real, a cloud-oriented partner has a strong sales pitch both to existing and new customers. Partners get an ongoing commission from subscriptions.

There is also an opportunity for new applications which link to cloud services. Yesterday Microsoft announced that the Windows Azure Marketplace, which used to offer data services and application building blocks, now also offers finished applications in US markets.

It is also true that Microsoft’s cloud offering is more partner-friendly than others, because it is a hybrid solution. Forrester’s report mentioned above assumes use of Active Directory Federation Services for single-sign on between on-premise and Office 365, a key feature which has been under-reported in the media coverage I have seen for Office 365. This feature, along with the fact that Microsoft’s server products like Exchange, SharePoint and Dynamics CRM can be deployed either online or as hosted services, means that there is flexibility over what is hosted and what is on-premise.

Nevertheless, it is hard to construct a reality in which the savings customers get from cloud services are real, without the further implication that total partner revenue will diminish, even though certain individual partners who take advantage of the new opportunities may end up winners.

This is true even if Microsoft succeeds in retaining all of its existing Microsoft-platform customers, rather than losing them to Google or other cloud providers. The consequences of a migration to Google, which is inherently not a hybrid platform, seem to me more severe.

Is there any way to put a positive spin on this, from a partner’s perspective? A couple of thoughts on this.

First, even if certain kinds of IT business are under threat from cloud migration, it is also true that the transforming impact of IT and the internet on businesses is far from complete. Much of what businesses currently do with IT can be greatly improved, there is still a thirst for new and improved business applications, and new technology including not only the cloud, but also massively parallel computing and of course mobile presents many new opportunities.

Second, it seems to me that partners should not be asking themselves how to maintain their business, but instead planning for change. It seems to me inevitable that the demand for skills in installing and nursing servers, deploying applications, and in maintaining and supporting clients, will diminish; and that is a good thing because these activities are IT plumbing and if they can be reduced it frees resources for other activities which have more business potential.

Behind the whooping and cheering, Microsoft’s message to partners is a tough one. Change, or die.

Google+, Bing social search, and internet monopolies

The big new thing in social media right now is Google+, the search giant’s latest attempt to grab a slice of the social internet from Facebook and Twitter.  I have been trying it for a few days and like everyone else have enjoyed playing with circles, the ability to categorise contacts into groups and choose who you sharing with. I like that it addresses a core issue, the fact that we want to share different things with different people, but dislike the added complexity. In practice, if I have a personal message I am likely to use email or some other form of direct messaging, whereas what I post on a social networking site I will likely address to everyone.

Still, Google+ is a decent effort, and irrespective of how it compares in detail to its rivals, I think it may take off simply because Google has other properties, specifically Google search and Google Android, which will point you to it.

The value of social networks to a search company was highlighted this week, not by Google but by Microsoft at its Worldwide Partner Conference. The opening keynote was short on big news, but did include a demo of new features in Bing, that other search engine.

Stefan Weitz Director of Influentials, showed how Bing can interact with Facebook so that you search results are annotated with the preferences of your friends. Here, Weitz has searched for “Mango” and Bing shows a section of results marked as Liked by your Facebook friends:

image

He then searches for Hawaii hotels for kids and sees this:

image

Once again, he sees two of his own contacts who have Liked a specific web site. He can go to the site with more confidence, or even click the name to interact directly with his contact and find out more.

This is powerful stuff, though the examples are contrived, and this is only going to work if you and your contacts do many of the same searches with the same search engine. The Microsoft/Facebook alliance has an advantage over Google in that Facebook has a bigger and more mature social graph; but Google has the advantage of a far larger search share, especially outside the USA. On this site, for example, here are the figures for July:

  • Google 90%
  • Bing 3.7%
  • Yahoo! 3.4%

You can figure out how much that leaves for “Other”.

Another Bing move also merits reflection. Weitz went on to demonstrate how Bing wants to you to do the transaction as well as the search on its portal. It is actually fine for Bing to do this with its small market share; but I am not sure that I like the implications for search in general.

This hints at my central concern, which is monopoly. One reason I like Twitter is that I have no sense that Twitter wants to take over my digital life. I know Google does; it wants my searches, my email, my documents, my music, my location, and now my friends.

I know Facebook wants a big slice of it too; it wants me to live inside its walled garden.

These thoughts chime for me with another incident from the last few days. I posted something  for sale on eBay, the dominant online auction site, and found that it has notched up its terms and conditions with me further in its own favour by insisting that I set up automatic payment of its fees before it would allow me to post the item. It also happens that PayPal, owned by eBay, has recently sent me a notice advising that it is restricting the number of sales that can be funded by credit card, I presume because it dislikes the consumer protection gained by buying by credit card.

The connection here is that eBay and PayPal only have the liberty to make these unilateral changes in their terms because of lack of competition. Yes, there are other online markets; but if you actually want to sell stuff, there is little real-world choice. Well, there is Amazon; and there is another organisation which, for all its many merits, is constantly extending its reach.

It is curious in a way, that when the web first appeared it seemed to be a great opportunity for the little guys – because on the Internet, nobody knows you’re a dog – but what we are now seeing is that winner-takes-all applies to a degree which goes beyond anything in the bricks and mortar world.

Hands on debugging an Azure application – what to do when it works locally but not in the cloud

I have been writing a Facebook application hosted on Microsoft Azure. I hit a problem where my application worked fine on the local development fabric, but failed when deployed to Azure. The application was not actually crashing; it just did not work as expected. Specifically, either the Facebook authentication or the ASP.NET Forms Authentication was failing; when I tried to log on, the log on failed.

This scenario, where the app works locally but not on Azure, is potentially a bad one because you do not have the luxury of breakpoints and variable inspection. There are several approaches. You can have the application write a log, which you could download or view by using Remote Desktop to the Azure instance. You can have the application output debug messages to HTML. Or you can use IntelliTrace.

I tried IntelliTrace. It is easy to set up, just check the box when deploying.

image

Once deployed, I tried the application. Clicked the Log On button, after which the screen flashed but still asked me to Log On. The log on had failed.

image

I closed the app, opened Server Explorer in Visual Studio, drilled down into the Windows Azure Compute node and selected View IntelliTrace Logs.

image

The logs took a few minutes to download. Then you can view is the IntelliTrace log summary, which includes a list of exceptions. You can double-click an exception to start an IntelliTrace debug session.

image

Useful, but I still could not figure out what was wrong. I also found that IntelliTrace did not show the values for local variables in its debug sessions, though it does show exceptions in detail.

Now, if you really want to debug and trace an Azure application you had better read this MSDN article which explains how to create custom debugging and trace agents and write logs to Azure storage. That seems like a lot of work, so I resorted to the old technique of writing messages to HTML.

At this point I should mention something you must do in order to debug on Azure and remain sane.  This is to enable WebDeploy:

image

It is not that hard to set up, though you do need to enable Remote Desktop which means a trip to the Azure management portal. In my case I am behind a firewall so I needed to configure Web Deploy to use the standard SSL port. All is explained here.

Why use Web Deploy? Well, normally when you deploy to Azure the service actually builds, copies and spins up a new virtual machine image for your app. That process is fundamental to Azure’s design and means there are always at least two copies of the VM in existence. It is also slow, so if you are making changes to an app, deploying, and then testing, you will spend most of your time waiting for Azure.

Web Deploy, by contrast, writes to your existing instance, so it is many times quicker. Note that once you have your app working, it is essential to deploy it properly, since Azure might revert your app to the last VM you created.

With Web Deploy enabled I got back to work. I discovered that FormsAuthentication.SetAuthCookie was not working. The odd thing being, it worked locally, and it had worked in a previous version deployed to Azure.

Then I began to figure it out. My app runs in a Facebook canvas. Since the app is served from a different site than Facebook, cookies may be rejected. When I ran the app locally, the app was in a different IE security zone, so different rules applied.

But why had it worked before? I realised that when it worked before I had used Google Chrome. That was it. IE worked locally; but only Chrome worked when deployed.

I have given up trying to fix the specific problem for the moment. I have dug into it a little, and discovered that cookie handling in a Facebook canvas with IE is a long-standing problem, and that the Facebook C# SDK may have bugs in this area. It is not essential for my sample; I have found I can get by with the Facebook session. To get the user ID, for example:

FacebookWebContext.Current.Session.UserId

The time has not been wasted though as I have learned a bit about Azure debugging. I was also amused to discover that my Azure VM has activation problems:

image

Internet Explorer 10 Platform Preview 2 gets web workers, HTML5 sandbox

Microsoft has released Internet Explorer 10 Platform Preview 2 which adds a number of features. These include:
  • Web Workers for background JavaScript.
  • File Reader API
  • HTML 5 drag and drop
  • CSS3 positioned floats
  • HTML 5 sandboxing
  • Some features of HTML 5 forms
I asked Microsoft’s Ryan Gavin and Rob Mauceri why IE seems so far behind its rivals in HTML 5 support if you look at a test site such as html5test.com, where IE9 scores 141 and Google Chrome 329. I was given several reasons. The site does not cover CSS3, SVG, yet does include “specs that are still under development, specs that have been superseded by other things, you have look at what it is actually testing,” said Mauceri. He added that the site only tests for the existence of the feature rather than how well it is implemented.
Fair points, but my sense is that Microsoft, while hugely ahead of where it used to be in terms of HTML standards support, is likely behind Google and Mozilla and likely to remain so. Microsoft has a slower release cycle, and a greater burden of legacy issues to worry about.
That said, Microsoft is pushing forward energetically compared to pre-IE9 days and the new features are interesting, particularly in the light of the greater role of HTML5 which has been promised for Windows 8.
Web Workers, for example, enables more responsive web pages through concurrent programming.
image
I also asked how Microsoft will enable greater access to the Windows API in Windows 8 without polluting the standards, but got the non unexpected answer “wait for the Build conference”.
No formal word on timing, but I would expect the delivery of IE10 and Windows 8 to be connected.