Upgrade npm on windows

npm currently has 3.10.6 (as of 16-Jul-2016) currently available as a beta.
You can currently install 3.x.x alongside 2.x.x by using the command

>npm install -g npm3
but that is not what I wanted.
I wanted to run npm as npm and I wanted to be running npm version 3.x.x so that I could use Angular 2

I followed the instructions from this link https://github.com/felixrieseberg/npm-windows-upgrade

Run Powershell as administrator

> Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force

> npm install –global –production npm-windows-upgrade

>npm-windows-upgrade

Now have version 3.10.6 installed

Thank you to the Microsoft DX Engineers

IIS URL Rewrite Gotcha

When using Visual Studio, and starting a website using F5 or ctrl-F5, the website displayed is the live website and not the localhost website on your development machine. Why?

URL Rewrite Add RuleThe problem can be caused by , for example, using url rewrite to force your website to use the www prefix.

Using the rule template Canonical domain name the code generated in the web.config file will look like rule CanonicalHostNameRule1, shown below:

What it means is that any {HTTP_Host} that does not match www. example .com will be redirected to www. example. com.

This will also include http://localhost:12345/,  the local web address used by visual studio.

Fortunately, many developers system may not have the URL Rewrite module installed (it is a separate download), and therefore will not encounter this problem. Unfortunately, it could take some developers by surprise if this module is downloaded at a later date, and they find that whilst trying to debug their website on their local machine, they find their browser displaying the live website.

One further quirk, is that even when you find the offending rewrite rule in the web.config and remove it, there appears to be some sort of persistent memory that will remember the permanent redirect and the debug session will still be redirected to the live site (http:///www.example.com).

Any comments on how to remove this ‘persistent’ memory of the 301 redirect would be most useful for those confronted by this issue.
<rewrite>
<rules>
<rule name="CanonicalHostNameRule1">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www\.example\.com$" negate="true" />
</conditions>
<action type="Redirect" url="http://www.example.com/{R:1} redirectType="Permanent" />
</rule>
</rules>
</rewrite>

This issue can be easily worked around by editing the rule manually to the following:


<rewrite>
<rules>
<rule name="Add WWW prefix">
<match url="(.*)" ignoreCase="true" />
<conditions>
<add input="{HTTP_HOST}" pattern="^example\.com$" />
</conditions>
<action type="Redirect" url="http://www.example.com/{R:0}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>

Any insights on the pros and cons of the above two rules would be welcomed.

A final note to anyone looking at URL rewrite is that Pluralsight have an excellent course by Scott Forsyth entitled URL Rewrite for Developers.

Visual Studio 2012 Install : Setup completed: however not all features installed correctly – KB2504637 Package Failed

21-Sep-2012. Got RTM version of VS2012 Professional downloaded from MSDN.

Installing on Windows 7 – Windows v6.1 (Build 7601: Service Pack 1)

Setup completed: however not all features installed correctly

KB2504637 Package Failed.

KB 2504637  appears to refere to the System.Net.dll in the .net 4 framework for multi targeting. As such the impact of the error being reported during the install in unknown. Check out the Micorsoft KB link below:

http://support.microsoft.com/kb/2504637

There are several complaints out there regarding this probelem, but the response so far has been – ‘unable to reproduce’

Further Examples can be found at the following URLs:

http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/91b13baa-6b6e-43a5-932b-0ce94a1652ce

https://connect.microsoft.com/VisualStudio/feedback/details/753274/error-for-kb2504637-when-installing-vs2012-rc-premium

Log is:

=========================================================================================

The file below is a .xlsx Excel file containing the installation log for Visual Studio 2012

dd_vs_professional_20120921102231

=========================================================================================

Which versions of Silverlight 3 components do I need for VS2008 SP1 and VS2010?

Which Versions of Silverlight 3 Components are required for VS2010

Which Versions of Silverlight 3 Components are required for VS2010

Running on a XP SP3 system.

I want to keep developing applications using VS2008 SP1, Expression Studio 3 and Silverlight 3.  I don’t want to break anything.

I would like to download and start using VS2010 again without breaking anything.

I noticed the following installation issue regarding VS2010 and Silverlight 3 SDK.

http://blogs.msdn.com/amyd/archive/2009/10/21/visual-studio-2010-and-silverlight-3-sdk.aspx

Visual Web Developer in Visual Studio 2010 has support in box for Silverlight 3 development and includes the Silverlight 3 developer runtime and Silverlight 3 SDK build 3.0.40818.

Silverlight 3 Tools for Visual Studio 2008 and Expression Blend 3 included SDK build 3.0.40624.

Silverlight 3 SDK build 3.0.40818 cannot be installed on machine where build 3.0.40624 is already installed. If you install Visual Studio 2010 on a machine that already has build 3.0.40624 installed, Visual Studio 2010 will indicate that the Silverlight 3 SDK failed to install, however you will still be able to do Silverlight development on Visual Studio 2010 with build 3.0.40624.

Silverlight 3 SDK build 3.0.40818 contains the following updates:

  • Remove dependency on .NET 3.5 and allow build when only .NET 4 is installed
  • Support for use of non-unicode characters in xap name
  • Improvements to refactoring and intellisense

To get build 3.0.40818of the Silverlight 3 SDK, uninstall Silverlight 3 SDK build 3.0.40624 from Add/Remove Programs and then install Silverlight 3 SDK build 3.0.40818 from: http://go2.microsoft.com/fwlink/?LinkID=157102.

———————————————————————————————————

I checked my own system using the Add/Remove Programs utility and found the following:

Currently Installed Program Version
Microsoft Silverlight 3.0.50106.0
Microsoft Silverlight 2 SDK 2.0.31005.0
Microsoft Silverlight 3 SDK 3.0.40624.0
Microsoft Silverlight 3 Toolkit – July 2009 3.0.30702.0037
Microsoft Silverlight 3 Tools for Visual Studio 2008 SP1 –ENU 9.0.30730.126

I found that I can get the following Downloads:

Download URL
Microsoft Silverlight 3 Toolkit – Nov 2009 http://silverlight.codeplex.com/releases/view/36060
Microsoft Silverlight 3 SDK version 3.0.40818 http://www.microsoft.com/downloads/details.aspx?FamilyID=1ea49236-0de7-41b1-81c8-a126ff39975b&displaylang=en
Microsoft Silverlight 3 Tools for Visual Studio 2008 SP1 –ENU http://www.microsoft.com/downloads/details.aspx?familyid=9442B0F2-7465-417A-88F3-5E7B5409E9DD&displaylang=en

 

Questions

  1. I do not develop for Silverlight 2, can this be safely uninstalled?
  2. In what order do I need to remove installed programs/versions and in what order do I need to install new versions?
  3. If I uninstall the Silverlight 3 Toolkit – July 2009, will this break existing applications using this toolkit?
  4. Can the Silverlight 3 Toolkit – July 2009 and Silverlight 3 Toolkit – Nov 2009 be safely installed side by side?
  5. Is there a general rule for what can and cannot be installed side by side with the various Silverlight components?
  6. I already have the current version for Microsoft Silverlight 3 Tools for Visual Studio 2008 SP1 –ENU installed.  Will it need to be re-installed?

Thanks in advance for any replies.

Scott Hanselman and Daniel Crenna (aka Dimebrain) advise NBC that all they need for Monday Night Football is a Vado or a Flip Mino

OK this is just a bit of fun as I respect the work that these guys do and the information they put out there for we poor mortals.

Scott Hanselman Vado

Dimebrain-Flip

I have been traveling around the country over the summer taking videos of my son at his various track meets.  I created a website and decided to add a video gallery using silverlight.  The intention was to provide a similer experience as provided by the BBC iPlayer.  In particular, I wanted viewers to be able to view the videos in Full Screen mode with one click.  I use a Panasonic SDR-S15 Camcorder, Sony Vegas Movie Studio to edit and Expression 3 to Encode at 1Mb/s.

Iam sure that the Vado HD and the Flip Mino HD perform really well in the environments used by both Scott and Daniel, but it really is a matter of horses for courses.

The Panasonic is a great little camera, lightweight, SDHC memory, and most importantly for me 10 x optical zoom.  When editing these videos and encoding them for the web one very quickly realises that if you do not have the desired quality on the original then you are not going to get the desired results on the end product.  If you check the Video Gallery then you will notice that the movies get better over time as I learn more.  Most importantly, use a tripod for these high zoom shots.

My next camera will definitely be HD and I will look to get better than 10 x zoom.  I am afraid that I can envisage an $1100 camera (UK prices really suck by the way) and I am absolutely certain that NBC will be paying a lot more than $1100 for the cameras that they use for Monday Night Football.

My point is, do not let Scott and Daniel talk you out of getting the camera you need.  If you need a Smith & Wesson 45, the most powerful hand camcorder ever made then make your day.

Silverlight, WCF, Security And Things You Might Not Know

Silverlight-Security-WCF

On 24-Jul-2009, I wrote an article entitled Where are the guides to Security Best Practices in Silverlight? , and followed this up with an article entitled Silverlight Security – Part One – Code Obfuscation.  Since then of I have been keeping an eye open for any new articles that tackled this very important subject.

Today, I found an article by Robbe Morris over at eggheadcafe.com entitled Silverlight, WCF, Security And Things You Might Not Know.

This article covers many of the security steps that you will want to implement in any Silverlight / WCF application.

Have you got lost in the maze of tutorials available for Silverlight and WPF?

Silverlight Confusion

Silverlight Confusion

 

I was looking for a tool that would allow me to organize links to all the articles that I have read.

I would like to add notes about each of the articles to tell me what important feature or technique is being explained. The notes would also tell me where to find the projects I installed or implemented on my own development systems.

I would also like to be able to index the articles by tags and categories and order the articles, videos, or tutorials in a way that will help me learn the subject in detail without missing anything out. Maybe something like a learning tree.

So for instance in Silverlight, you may have:

Silverlight Tutorial Part 1 (of 8): Creating “Hello World” with Silverlight 2 and VS 2008 by Scott Guthrie, here.

Find on my computer here:
C:\Documents and Settings\Luddite\My Documents\Visual Studio 2008\Projects\Silverlight\MSDiggSample_VB

Jesse Liberty has started Project Turing, here.

This project uses RIA Services which is currently in beta, I will want to come back to this when RIA Services has been officially released.

Brad Abrams has a series on BusinessApps for Silverlight 3 RTM and .NET RIA Services (and now Azure), here.

The articles are numerous and varied and some way of keeping things up to date, allowing you to replace articles that have become obsolete, or replace articles which you have found to do a better job.

Can anyone recommend a good product that would help with this.

Scot Hanselman recommends Evernote, not for this, but I was wondering if something like Evernote would fit the bill…