Reputation: 116170
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
m.serviceModel/extensions/behaviorExtensions.
Parameter name: element (C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\m
achine.config line 323)
At line:1 char:21
+ Publish-AzureService <<<< -name TaskListContoso -location "North Central US"
-launch
+ CategoryInfo : CloseError: (:) [Publish-AzureService], Configur
ationErrorsException
+ FullyQualifiedErrorId : AzureDeploymentCmdlets.Cmdlet.PublishAzureServic
eCommand
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.
Upvotes: 0
Views: 1169
Reputation: 26
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:
inside
<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior" type="Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior, Microsoft.VisualStudio.Diagnostics.ServiceModelSink, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
If the dll isn't installed, you can remove the references to it in machine.config at:
system.serviceModel/commonBehaviors/endpointBehaviors
and
system.serviceModel/commonBehaviors/serviceBehaviors
Note that you will want to BACK UP your machine.config before making any changes.
Upvotes: 1