Singapore MVP Roundtable Session – Dec 2011

The routable section is an event ogranized by Microsoft Singapore for MVPs, User Group leaders and Microsoft DPE team to meet up and discuss anything from chitchat to serious discussion once in every four months. (Nope, Not this one “Microsoft RoundTable” ). We used to gather at bar in town and Microsoft provides us free flow of drinks and foods (This is where you can order drinks in sequential order from menu. ^^ )

We had a roundtable section last week and it was awesome. I had good discussion with Hammad regarding Windows 8 and tablets. I’m looking forward to hear more from him soon.

Thanks to Clarisse Ng (my MVP lead) for organizing this event.

IIS 6: HTTP Compression Problem

Short Version

  • Error: Internet Explorer cannot display the webpage
  • Solution: Disable “HTTP Compression” in both Web extension and “Service” tab of Website properties

This short version is for those who are not interested about the details of this problem.

Long version

It took me almost 2 days to figure out about this issue so I’m going to share the details with you guys in this post. But as I didn’t use IIS 6 for long time and my main technical expertise is not IIS, the solution that I found might not be the best solution. If you guys know better solution for this issue, please feel free to share with us in comment section. Thanks!

Environment

Our server is Windows 2003 advanced server. We have .NET 1, .NET 2 and .NET 4 installed on that server. The existing website which is written in ASP.NET 2.0 is currently running on that server.

Problem

We got this issue when we tried deploying our new web application which is a hybrid app of ASP.NET 4.0 and ASP.NET MVC 3 on that server. To my surprise, ASP.NET MVC works great fine but ASP.NET 4.0 pages drove us crazy. I thought that the problem might come from the fact that our application is a hybrid so I created a brand new ASP.NET 4.0 application in Visual Studio 2010 and published it on the server but it didn’t work. It’s very weird because MVC project is working fine so .NET 4 framework shouldn’t have any problem but couldn’t figure out why ASP.NET 4.0 site wasn’t working.

In order to narrow down the problem, I created new Virtual Directory and new application pool and put a HTML page in that directory so we don’t need to worry about .NET issue. but this issue was getting more weird. Can you guess what happened? When I tried accessing that page from browser, it was working fine for the first time request but it didn’t work for second time request. I got different errors as below in different browsers.

IE

Internet Explorer cannot display the webpage

Google Chrome

This web page is not available The web page at http://19x.10x.10x.2:17x/simpleweb/c.html might be temporarily down or it may have moved permanently to a new web address. Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.

Firefox

Content Encoding Error The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression. Please contact the website owners to inform them of this problem.

IE didn’t give any information as usual (well, we love IE! :P ) but when I saw the error message in Firefox, the encoding and gzip things came into my mind but I wasn’t so sure whether IIS server stopped responding the second request or the encoding issue. I looked at IIS log. As you can see below, IIS returns 200 so IIS wasn’t blocking the second request.

IIS log

#Software: Microsoft Internet Information Services 6.0
#Version: 1.0
#Date: 2011-12-14 06:27:57
#Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status sc-bytes cs-bytes

2011-12-14 06:29:27 W3SVC1531730165 127.0.0.1 GET /simpleweb/d.html – 170 – 127.0.0.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET4.0C;+.NET4.0E) – 200 0 0 378 284

Just to make it more sure, I used Fiddler to capture the traffic between the browser and server. I managed to get the response but when I viewed the response stream, I got this error below in Fiddler.

—————————
Fiddler: UnGZip failed
—————————
The content could not be decompressed.
The magic number in GZip header is not correct. Make sure you are passing in a GZip stream.
—————————
OK
—————————

Solution

As Fiddler showed that there is something wrong with gzip, I decided to turn off the HTTP compression on that server.

How to turn off the HTTP compression on IIS 6? It’s pretty simple. Go to the properties of Website (not virtual directory or application) and uncheck “Compress application files” and “Compress static files” on “Service” tab. And set “Prohibit” to “HTTP Compression” in Web extension.

Note that I tested HTTP compression on fresh 2003 server and it works so I think gzip assembly got some problems on that server only. That’s why I mentioned that disabling HTTP compression might not be the best solution but we decided to stop experimenting it for now because we are using 2003 server temporarily. I don’t think it’s good idea to host ASP.NET 4 app and MVP app on IIS 6 so we are going to get new Windows 2008 R2 service with IIS 7 later.. But yeah. if you have a better solution then please share with us.

Credits: Thank you all to everyone who gave a lot of suggestions for this issue. You guys helped me a lot. Thanks! 

Digg hates me!

It’s true! Digg hates me. We were friends a few years back. The bloggers around the world submit the awesome links to you and you helps us to give some traffic for our blog. It is win-win situation for both sides. I didn’t know that things has been changed until I submit one of my posts to that site today.

I got this error below as soon as I enter my link in yours. Look at the screenshot. How bad is that? Your development team didn’t create the overlay message properly and your QA failed to find out about it.

I’m sure you can’t even read your own message so I posted the text below.

Stop right there criminal scum!

This page may be a forgery or imitation of another website, designed to trick users into sharing personal or financial information. Entering any personal information on this page may result in identity theft or other abuse

It’s not the first time that you treat my site like a spam site, Digg! I will show you the email history that I and your support team had a couple of months back.

Digg Support – Nov 18

Hello mchlsync,

We use the Google Safe Browsing API to help prevent spam and malware from getting submitted to Digg.com. It appears that Google has flagged that domain. For more information please check the link provided below:

http://code.google.com/apis/safebrowsing/

I went to Google Web Master tool and checked my site. I found no issue, Digg!

I replied to your support with this screenshot.

Digg support team – Nov 19~

Hello,

We’ve contacted our development team who are investigating the issue, and will fix it as soon as possible. Please don’t hesitate to contact us should you have any further questions.

For more information, please see Digg’s FAQ section (http://about.digg.com/faq).

Follow us on Twitter! http://twitter.com/digg

After a few hours on the same day, they asked me to try again.

Try again now, it should work. Let us know if you’re still having problems

When I checked it again, I found that the issue has been fixed.

But today, the issue show up again. I’m not sure how you guys are handling the regression issue but it’s not cool if this issue keep on coming back again and again.

So Digg! do something about it!

backwp.php in Twenty Eleven Theme

Some of you know that my blog was under attack a few months back. I started taking care of my blog’s security as much as I can since then. One of the things that I did is that I installed WP-Malwatch to scan the suspicious activities on my blog everyday. That plugin is kinda useful tho.

I received a notification from that plugin saying that it’s suspecting some viruses on my blog this morning so I quickly logged in and scanned my current template manually on dashboard. I found one new file called backwp.php inside the theme folder.

I’m guessing that it might be the back-up file of Twently Eleven them but I couldn’t find any information from theme download page so I posted a question about that file on forum and am still waiting for the answer. Let me know if you have any idea about this file. For the time being, I deleted this file and tested my blog. It’s still working. I think that it’s very safe to delete that file.

Another weird thing which is happening since I started using “Twently Eleven” theme is that I’m getting this error often when I’m playing around in dashboard area. I tried contacting with people behind this theme and no reply from them.

This theme is awesome and it was created by the official wordpress.com team but after using it for a while, I realized that this theme comes with quite a few problem as well.. Maybe, it’s time for me to look for new theme..

Nuget Update Error

Yap. It’s happening again with Nuget Update. I got new update for nuget this morning but I kept on getting error when I update it. When I check the log, I found that it’s the same issue that we had a few months back. I’m not sure how many times we are going to face this issue in future so I’m just sharing it with you guys in case you have the same problem.

Error Logs

16/12/2011 9:38:25 AM – Verifying matching extension signatures before updating…
Installed Extension Path: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\NuGet Package Manager\1.5.20902.9026\
Update Extension Path: c:\users\michael.sync\appdata\local\temp\tmp479e.tmp
16/12/2011 9:38:25 AM – VSIXInstaller.SignatureMismatchException: The signature on the update version of ‘NuGet Package Manager’ does not match the signature on the installed version. Therefore, Extension Manager cannot install the update.
at VSIXInstaller.Common.VerifyMatchingExtensionSignatures(IInstalledExtension installedExtension, IInstallableExtension updateExtension)
at VSIXInstaller.InstallProgressPage.BeginInstallVSIX(SupportedVSSKU targetAppID)
16/12/2011 9:38:25 AM – Install Error : VSIXInstaller.SignatureMismatchException: The signature on the update version of ‘NuGet Package Manager’ does not match the signature on the installed version. Therefore, Extension Manager cannot install the update.
at VSIXInstaller.Common.VerifyMatchingExtensionSignatures(IInstalledExtension installedExtension, IInstallableExtension updateExtension)
at VSIXInstaller.InstallProgressPage.BeginInstallVSIX(SupportedVSSKU targetAppID)

Solution

  • Open Visual Studio 2010 with administrator right (You need this. Otherwise, the “Uninstall” button on Nuget will be disabled. )
  • Remove Nuget from Visual Studio 2011 first
  • And install it again from online gallery
That’s it!

Silverlight 5 for Christmas

The release of Silverlight 5 is announced on Silverlight team blog a few days back. You can go and download it from this link. I’m very glad that Silverlight team managed to add some features that we requested. Thanks Silverlight team!

One interesting thing that I noticed is that SL team put a link to Microsoft Silverlight Support Lifecycle Policy in the announcement post. I’m happy to know that they are still going to ship updates for Silverlight 5 in future and they promised that SL5 will work on those browsers until 10/12/2021.

Here is the list of features shipped with Silverlight 5. It’s just a copy and paste from “What’s new in Silverlight 5” document.

Improved media support

  • Low Latency Audio Playback: Use the SoundEffect API to trigger low-latency sound
  • Variable Speed Playback: allows video to be played at different speeds and supports fast-forward and rewind. At up to twice the speed, audio pitch correction allows users to watch videos while preserving a normal audio pitch.
  • H/W Decode of H.264 media: Significant performance improvements with H.264 media decoding of unprotected content
  • DRM Key Rotation/LiveTV Playback: Long-running live TV playback protected through the use of rotating licenses
  • Application-Restricted Media: Prevents playback of protected content in unauthorized applications

Improved Text support

  • Text Tracking & Leading: Exercise fine-grained control over the spacing between characters and lines in your text
  • Linked Text Containers: Create linked RichTextBlocks that allow text to flow seamlessly from one to the next
  • OpenType and Pixel Snapped Text : Improved text clarity
  • Postscript vector printing: reduces the size of print jobs and improves rendering quality of text
  • Performance improvements for Block Layout Engine.

Building next-generation business applications

  • PivotViewer — now included in SDK. Adds support for dynamic client-based collections, XAML-based visuals, and customizability.
  • ClickCount: Add support for multi-click to your application
  • Listbox/ComboBox type-ahead text searching: Listboxes and ComboBoxes can now scroll based on text input
  • Ancestor RelativeSource Binding: Bind to a property on a parent control
  • Implicit DataTemplates: Allow DataTemplates to be defined implicitly
  • DataContextChanged event
  • Added PropertyChanged to the UpdateSourceTrigger enum
  • Save File and Open File Dialog: Specify a default filename when you launch your SaveFileDialog and specify a default directory when you launch your OpenFileDialog
  • Databinding Debugging: Set a breakpoint directly in XAML, examine locals, and debug your bindings
  • Custom Markup Extensions: Execute custom code at XAML parse time
  • Binding on Style Setters: You can now specify a binding within a style

Silverlight 5 performance improvements

  • Parser Performance Improvements: Improved XAML parse times for UserControls & ResourceDictionaries
  • Network Latency Improvements: Significant performance improvement in ClientHttpWebRequest scenarios
  • H/W accelerated rendering in IE9 windowless mode: Silverlight now uses the new SurfacePresenter APIs for H/W accelerated rendering in IE9 windowless mode
  • Multicore JIT: Shortens the start-up time for Silverlight apps
  • 64-bit browser support

Graphics improvements

  • Improved Graphics stack: The graphics stack has been re-architected to add features such as Independent Animations
  • 3D: Use the XNA API on the Windows platform to gain low-level access to the GPU and draw vertex shaders and low-level 3D primitives. Includes Render targets, XNA built-in effects, surface composition settings for depth/stencil buffers and multi-sample anti-aliasing

Silverlight 5 extends features of the “Trusted Application” model

Silverlight 5 extends features of the ‘Trusted Application’ model to the browser for the first time. These features, when enabled via a group policy registry key and an application certificate, mean users won’t need to leave the browser to perform complex tasks:

  • Multiple window support: Launch multiple top-level windows inside a SL OOB application
  • Full-Trust in-browser: Using Group Policy, deploy signed in-browser applications that harness the full power of full-trust functionality
  • In-browser HTML support: Host your WebOC within an in-browser SL application
  • Unrestricted File System Access: Read from and write to any directory on your system, from a full-trust application
  • P/Invoke support : Allows existing native code to be run directly from Silverlight

Tools improvements

  • Visual Studio Team Test support.