Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Error publishing NodeJS app to Azure

Error publishing NodeJS app to Azure


I installed the SDK with no problems and was following along with the Hello World example. When I get to the Publish-AzureService command it fails:

PS C:\code\node\tasklist\WebRole1> Publish-AzureService -name TaskListContoso -l
ocation "North Central US" -launch
Publish-AzureService : An error occurred creating the configuration section han
dler for system.serviceModel/commonBehaviors: Extension element 'Microsoft.Visu
alStudio.Diagnostics.ServiceModelSink.Behavior' cannot be added to this element
.  Verify that the extension is registered in the extension collection at syste
Parameter name: element (C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\m
achine.config line 323)
At line:1 char:21
+ Publish-AzureService 

I've searched everywhere and have not been able to find a solution. I've done everything short of re-install windows but heading there soon.

Problem courtesy of: Micah


This looks like an issue with your machine.config. Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior is a wcf behavior that enables wcf debugging features inside visual studio, and it loooks like something removed the behavior Extension from your machine configuration without removing the references to it in common endpoint and service behaviors.

If the dll (Microsoft.VisualStudio.Diagnostics.ServiceModelSink) is installed on your computer (should be in the Global Assembly Cache if so, \windows\assembly), then you should be able to add the extension element back into your machine .config:


If the dll isn't installed, you can remove the references to it in machine.config at:




Note that you will want to BACK UP your machine.config before making any changes.

Solution courtesy of: Mark Cowlishaw


View additional discussion.

This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Error publishing NodeJS app to Azure


Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription