将 NodeJS 应用程序发布到 Azure 时出错
我安装了 SDK,没有出现任何问题,并且按照 Hello World 示例进行操作。当我到达 Publish-AzureService 命令时,它失败了:
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
我已经到处搜索但无法找到解决方案。除了重新安装 Windows 之外,我已经完成了所有操作,但很快就会去那里。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这看起来像是您的 machine.config 的问题。 Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior 是一种 wcf 行为,可在 Visual Studio 内启用 wcf 调试功能,它看起来像是从计算机配置中删除了行为扩展,而没有删除公共终结点和服务行为中对它的引用。
如果 dll (Microsoft.VisualStudio.Diagnostics.ServiceModelSink) 安装在您的计算机上(如果是的话,应该位于全局程序集缓存中,\windows\assemble),那么您应该能够将扩展元素添加回您的计算机 .config 中:
内
如果未安装 dll,您可以在 machine.config 中删除对它的引用:
并
请注意,在进行任何更改之前,您需要备份 machine.config。
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
If the dll isn't installed, you can remove the references to it in machine.config at:
and
Note that you will want to BACK UP your machine.config before making any changes.