Monthly Archives: June 2011 - Page 3

List of issues fixed in SharePoint 2010 SP1

If you are looking for a single document that discusses about the issues fixed in SharePoint 2010 SP1, then hit the link below to download the Excel workbook that lists the issues fixed by this service pack: Microsoft SharePoint 2010 and Office servers Service Pack 1 Changes You can filter the issues by product, which is great: This information available in the Service Pack 1 KB article…(read more)

The Perils of User-Agent Sniffing, 2011 Edition

I continue to find myself amazed at how often site-compatibility issues turn out to have a root cause related to User-Agent sniffing.

For instance, earlier this year, someone wrote into the comments section on one of my posts noting that the HTML5 canvas art site WeaveSilk.com wasn’t working in IE9. After reading through thousands of lines of JavaScript, including various libraries, I found the culprit at the very end of the page, which you can see here, along with the very simple fix:

image

Simply put, if the browser’s UA string contained “MSIE”, the site skipped all of its initialization code. Oops.

Today, I encountered two more issues of this class of problem. One is with the Google Fonts site. By default, if you load this site, you’ll find that it’s blank and contains no content:

image

A quick peek in Fiddler shows that the problem is that the server is returning HTML pages with an “Your browser is unsupported” message when IE attempts to download the CSS and JS for the page.

image

If you use the F12 Developer Tools or Fiddler to change the User-Agent string, then the site returns correct content and the page loads correctly:

image

Because the Google.com domain is on the Compatibility View list, the site is in IE8 Browser Mode by default. You can see this on a Google page by pressing F12 to see the Developer tools; the Browser Mode is IE8: image. While the page itself can select a later Document Mode using an X-UA-Compatible meta tag, the User-Agent string is selected by the Browser Mode, not the Document Mode. The distinction between these two modes is often misunderstood—there’s a great MSDN Article which explains the difference between the Browser Mode and Document Mode settings.

The second UA-string issue I encountered today was closer to home. Eagle-eyed viewers of the high-resolution video included in the blog post announcing the IE10 Platform Preview 2 might have observed that the text in the Fireflies demo page claims that the Platform Preview is “Internet Explorer 7” while the status bar clearly indicates that it’s an IE10 Platform Preview build running in IE10 document mode:

clip_image002

If you look at the source of the demo site, you’ll notice that FeatureDetection.js includes the following code (typos and all):

image

The code isn’t looking for the Trident/6.0 token sent in the IE10 User-Agent string and hence doesn’t realize that this PPB has loaded the site with Browser Mode: Internet Explorer 10 Compatibility View. The page itself is running in IE10 Document Mode because it includes the following META tag:

<meta http-equiv=”X-UA-Compatible” content=”IE=edge” />

Because the page is properly running in IE10 Document Mode, the markup (including the CANVAS element) continues to work correctly, but the “What browser are you using” notice at the bottom left is misleading.

You might be wondering why the video indicates that the page was loaded in Browser Mode: IE10 Compatibility View. The answer is simple– when the video was recorded, the new Fireflies demo hadn’t yet been published. We were using the PPB to load a mirror copy of the demo from an internal staging server on our Intranet. By default, Internet Explorer runs Intranet pages in Compatibility View.

Now, when you visit the IETestDrive site, you should see a proper browser identifier because the browser will be in IE10 Browser Mode:

image

-Eric

datajs V1 Now Available

Over the last few months, we have been hard at work on the datajs library, releasing four preview versions and working with web developers to fine-tune the library. Today, we’re proud to announce that the first version of datajs is now available for download.

What does it do?
datajs is a JavaScript library for web applications that supports the latest version of the OData protocol and HTML5 features such as local storage. It provides a simple, extensible API that can help you write better web applications, faster. Our goal is to simplify working with data on the web, and to leverage improvements in modern browsers.

Where do I get it?
You can download the development and minified version at http://datajs.codeplex.com/. The source code for the release is also available, distributed under the MIT license.

You can also use NuGet to download the datajs package.

We hope this helps build a better web, and we look forward to hearing more from your experience.

- The datajs team

Update software to reduce risk of cyber attack, top suppliers tell business – 6/29/2011 – Computer Weekly

 

Quote, “Businesses are unnecessarily exposing themselves to cyber attack simply by failing to update to the latest versions of the software they are running, according to Microsoft and Adobe.

Both software companies are developing products using a security development lifecycle (SDL) approach first introduced by Microsoft in 2004 and later adopted and adapted by Adobe, where it was rolled out between 2009 and 2010, and entered the first phase of automation in 2010 to 2011.

The SDL, called the secure product lifecyle (SPLC) at Adobe, is integrated into the development lifecycle and enables continuous improvement in the security posture of software products, said Steve Lipner, senior director, security engineering strategy, at Microsoft’s Trustworthy Computing (TwC) group.”

Update software to reduce risk of cyber attack, top suppliers tell business – 6/29/2011 – Computer Weekly

Azure and HPC Server: You can now run MPI Workloads in Azure

Exciting news on the Azure HPC space. With the new release of the HPC Pack 2008 R2 Service Pack 2 (SP2) you can now run MPI Workloads in Azure (in addition to Batch and Parametric sweeps)

Post: http://blogs.technet.com/b/windowshpc/archive/2011/06/29/hpc-pack-2008-r2-service-pack-2-sp2-is-now-available.aspx 

The second service pack to the HPC Pack 2008 R2 software is now available!

This update includes a number of great new features, including

  • Enhanced Azure capabilities, such as adding Azure VM nodes to your cluster, creating Azure node configuration scripts, and supporting Remote Desktop connections
  • Ability to run MPI-based applications in Azure
  • Job scheduling support through a REST interface and an IIS-hosted web portal
  • A new job scheduling policy that uses ‘resource pools’ to ensure compute access to different user groups
  • SOA improvements, such as in-process broker support for increased speed, and a new common data staging feature
  • and all the ‘normal’ service pack stability improvements

For more information on those, and other, new features available in Service Pack 2 please see our documentation on TechNet.

The single SP2 installer applies to both Express and Enterprise installations, as well as the standalone ‘Client Utilities’ and ‘MS-MPI’ packages. You can download it from the Microsoft Download Center.

An important note is that this service pack can not be uninstalled by itself. Uninstalling the service pack will also uninstall the HPC Pack itself, so you’ll need to take a full backup (including the SQL databases) before installation if you want to be able to ‘roll back.’

If you do not have an HPC Pack 2008 R2 cluster, you can download a free Windows HPC Server 2008 R2 evaluation version. Before you install, you can try out the new Installation Preparation Wizard which can help analyze your environment for common issues and provide some best practice guidance to help ensure an easy HPC cluster setup.

Let us know your thoughts over on our Windows HPC discussion forums.

Man, go get you some Mango!

If you have been working with the Windows Phone Developer Tools for Mango, no doubt you have played around with the emulator some. And as good as that emulator is for testing your apps, what you’ve really been wanting is a way to test your apps on a real device.

Well, starting today you finally get you chance! As of this morning, you can download Beta 2 of the tools and a beta image of Windows Phone codename Mango that you can install on your very own retail device, regardless of carrier or brand.

Check out the full blog post from the Windows Phone developer blog. Essentially, they are distributing invitations for those developers registered with http://create.msdn.com/ so check your email for an invitation.

Having played with Mango for a little while, I can tell you that the app experience is faster, more responsive, and amazingly well integrated with the phone. Look for some blog posts from me in the near future highlighting new capabilities of the platform!

Man, go get you some Mango!

If you have been working with the Windows Phone Developer Tools for Mango, no doubt you have played around with the emulator some. And as good as that emulator is for testing your apps, what you’ve really been wanting is a way to test your apps on a real device.

Well, starting today you finally get you chance! As of this morning, you can download Beta 2 of the tools and a beta image of Windows Phone codename Mango that you can install on your very own retail device, regardless of carrier or brand.

Check out the full blog post from the Windows Phone developer blog. Essentially, they are distributing invitations for those developers registered with http://create.msdn.com/ so check your email for an invitation.

Having played with Mango for a little while, I can tell you that the app experience is faster, more responsive, and amazingly well integrated with the phone. Look for some blog posts from me in the near future highlighting new capabilities of the platform!

IE10 Platform Preview 2 Released

The IE10 Platform Preview 2 has been released today and you download it from http://www.ietestdrive.com. The official launch post can be found over on the IE blog.

What new features does it include?

You can see some of the new features in this demo by Ari from the IE team:

What is a Platform Preview?

These are releases we send out on a regular basis. We are currently aiming to release a platform preview every 8-12 weeks, this one was released 11 weeks after IE10 PP1. These previews contain implementations of features that are close to final and are less likely to change, but by no means are guaranteed to represent the final implementation that we put in our shipping browser.

As well as platform previews we also release features on HTML5 Labs. HTML5labs.com is our way of bringing you interesting implementations so that you can test and provide feedback on them, with the caveat that the implementation will change and when we change there will likely be breaking changes. The File API has been the first feature from HTML5labs.com that has graduated to the Platform Preview. This graduation is an acknowledgement that were are happy that the standard is stable.

New Demos

With every new Platform Preview we also release new demos to showcase what can be achieved with the new features, Platform Preview 2 is no exception here are the new demos:

  • Fireflies highlights HTML5 canvas, audio, video and CSS gradients – View Site
  • How Stuff Works illustrates how different browsers today give different results. The quality and correctness of different browsers’ HTML5 engines vary widely this is something that all browser vendors must work on to improve adoption. At Microsoft we have submitted thousands of test to the W3C so that other browsers can benefit from the investment we have made in testing our browser to ensure it complies with the HTML5 standard. View Site

HTML5 is Ready

A number of the new features in the platform preview are related to HTML5. Features that are included in the shipping browser (IE9) are ones that we think you are safe to use today. The features in our platform Previews may change, hopefully by the time we reach IE10 release these features will be ready for production sites too.

HTML5 has been a buzzword for a lot of developers for some time but in large part it’s been used in small doses on real sites or it’s been used to build out cool new test sites. That’s about to change. When you look at the excitement about HTML5 from developers across design agencies to big brand companies, it’s clear that HTML5 is about to reach the tipping point where it goes from being a fun new technology for experimental projects to being the default way developers build out the web.

Real companies are putting their toes in the water.

  • Facebook is rumoured to be working on an entirely new platform based on HTML5, codenamed Project Spartan.
  • The Financial Times are getting ready to use HTML5, and are testing its capabilities via web apps.
  • The Internet Archive just added HTML5 support to their collection of digital videos – over 500,000 assets.
  • Disney Tron, The Killers, PACMAN have already launched HTML5 sites.
  • Red Bull, Rough Guides, and ESPN UK have started implementing HTML5 on their sites.
  • Electronic music site Beatport recently unveiled a beta of their forthcoming HTML5 site overhaul, a complete migration from Flash to HTML5.

If your new to HTML5 and want to get a better understanding of it, why not check out these two videos from Tech.Days:

Azure AppFabric CTP ?????

????AppFabric Team ???CTP??SDK??????????????????CTP?????:

  • AppFabric ????(Develper Tools)
  • AppFabric ???????(Application Manager)
  • Compoition Model
  • ???????WCF?WF???

 ??????????Visual Studio 2010???AppFabric ?????????:

 ????AppFabric????????????????????????:

AppFabric???Azure????????????????????????????????????
Service Bus?Caches?Access Controls?Workflows…????????????????

?????????????http://portal.appfabriclabs.com/?????????????CTP????????
?????????????????????????????

 

 

 

 

 

 

 

Use it or lose it! [New Delay.FxCop code analysis rule helps identify unused resources in a .NET assembly]

My previous post outlined the benefits of automated code analysis and introduced the Delay.FxCop custom code analysis assembly. The initial release of Delay.FxCop included only one rule, DF1000: Check spelling of all string literals, which didn’t seem like enough to me, so today’s update doubles the number of rules! :) The new rule is DF1001: Resources should be referenced – but before getting into that I’m going to spend a moment more on spell-checking…

 

What I planned to write for the second code analysis rule was something to check the spelling of .NET string resources (i.e., strings from a RESX file). This seemed like another place misspellings might occur and I’d heard of other custom rules that performed this same task (for example, here’s a sample by Jason Kresowaty). However, in the process of doing research, I discovered rule CA1703: Resource strings should be spelled correctly which is part of the default set of rules!

To make sure it did what I expected, I started a new application, added a misspelled string resource, and ran code analysis. To my surprise, the misspelling was not detected… However, I noticed a different warning that seemed related: CA1824: Mark assemblies with NeutralResourcesLanguageAttribute “Because assembly ‘Application.exe’ contains a ResX-based resource file, mark it with the NeutralResourcesLanguage attribute, specifying the language of the resources within the assembly.” Sure enough, when I un-commented the (project template-provided) NeutralResourcesLanguage line in AssemblyInfo.cs, the desired warning showed up:

CA1703 : Microsoft.Naming : In resource 'WpfApplication.Properties.Resources.resx', referenced by name
'SampleResource', correct the spelling of 'mispelling' in string value 'This string has a mispelling.'.

In my experience, a some people suppress CA1824 instead of addressing it. But as we’ve just discovered, they’re also giving up on free spell checking for their assembly’s string resources. That seems silly, so I recommend setting NeutralResourcesLanguageAttribute for its helpful side-effects!

Note: For expository purposes, I’ve included an example in the download: CA1703 : Microsoft.Naming : In resource 'WpfApplication.Properties.Resources.resx', referenced by name 'IncorrectSpelling', correct the spelling of 'mispelling' in string value 'This string has a single mispelling.'.

 

Once I realized resource spell checking was unnecessary, I decided to focus on a different pet peeve of mine: unused resources in an assembly. In much the same way stale chunks of unused code can be found in most applications, it’s pretty common to find resources that aren’t referenced and are just taking up valuable space. But while there’s a built-in rule to detect certain kinds of uncalled code (CA1811: Avoid uncalled private code), I’m not aware of anything similar for resources… And though it’s possible to perform this check manually (by searching for the use of each individual resource), this is the kind of boring, monotonous task that computers are made for! :)

Therefore, I’ve created the second Delay.FxCop rule, DF1001: Resources should be referenced, which compares the set of resource references in an assembly with the set of resources that are actually present. Any cases where a resource exists (whether it’s a string, stream, or object), but is not referenced in code will result in an instance of the DF1001 warning during code analysis.

Aside: For directions about how to run the Delay.FxCop rules on a standalone assembly or integrate them into a project, please refer to the steps in my original post.

As a word of caution, there can be cases where DF1001 reports that a resource isn’t referenced from code, but that resource is actually used by an assembly. While I don’t think it will miss typical uses from code (either via the automatically-generated Resources class or one of the lower-level ResourceManager methods), the catch is that not all resource references show up in code! For example, the markup for a Silverlight or WPF application is included as a XAML/BAML resource which is loaded at run-time without an explicit reference from the assembly itself. DF1001 will (correctly; sort of) report this resource as unused, so please remember that global code analysis suppressions can be used to squelch false-positives:

[assembly: SuppressMessage("Usage", "DF1001:ResourcesShouldBeReferenced", MessageId = "mainwindow.baml",
    Scope = "resource", Target = "WpfApplication.g.resources", Justification = "Loaded by WPF for MainWindow.xaml.")]

Aside: There are other ways to “fool” DF1001, such as by loading a resource from a different assembly or passing a variable to ResourceManager.GetString. But in terms of how things are done 95% of the time, the rule’s current implementation should be accurate. Of course, if you find cases where it misreports unused resources, please let me know and I’ll look into whether it’s possible to improve things in a future release!

 

[Click here to download the Delay.FxCop rule assembly, associated .ruleset files, samples, and the complete source code.]

 

Stale references are an unnecessary annoyance: they bloat an assembly, waste time and money (for example, when localized unnecessarily), confuse new developers, and generally just get in the way. Fortunately, detecting them in an automated fashion is easy with DF1001: Resources should be referenced! After making sure unused resources really are unused, remove them from your project – and enjoy the benefits of a smaller, leaner application!