Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc 使用注册为allowDefinition=';MachineToWebRoot';在根web.config文件之外_Asp.net Mvc - Fatal编程技术网

Asp.net mvc 使用注册为allowDefinition=';MachineToWebRoot';在根web.config文件之外

Asp.net mvc 使用注册为allowDefinition=';MachineToWebRoot';在根web.config文件之外,asp.net-mvc,Asp.net Mvc,我正在开发一个应用程序,遇到了这个错误(你可以在这篇文章的标题中看到),我在任何地方都找不到解决方案。此错误指向以下代码行: <protocols> <add name="net.tcp" processHandlerType="System.ServiceModel.WasHosting.TcpProcessProtocolHandler, System.ServiceModel.WasHosting, Version=4.0.0.0, Culture

我正在开发一个应用程序,遇到了这个错误(你可以在这篇文章的标题中看到),我在任何地方都找不到解决方案。此错误指向以下代码行:

    <protocols>
        <add name="net.tcp" processHandlerType="System.ServiceModel.WasHosting.TcpProcessProtocolHandler, System.ServiceModel.WasHosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
            appDomainHandlerType="System.ServiceModel.WasHosting.TcpAppDomainProtocolHandler, System.ServiceModel.WasHosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
            validate="false" />
        <add name="net.pipe" processHandlerType="System.ServiceModel.WasHosting.NamedPipeProcessProtocolHandler, System.ServiceModel.WasHosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
            appDomainHandlerType="System.ServiceModel.WasHosting.NamedPipeAppDomainProtocolHandler, System.ServiceModel.WasHosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
            validate="false" />
        <add name="net.msmq" processHandlerType="System.ServiceModel.WasHosting.MsmqProcessProtocolHandler, System.ServiceModel.WasHosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
            appDomainHandlerType="System.ServiceModel.WasHosting.MsmqAppDomainProtocolHandler, System.ServiceModel.WasHosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
            validate="false" />
        <add name="msmq.formatname" processHandlerType="System.ServiceModel.WasHosting.MsmqIntegrationProcessProtocolHandler, System.ServiceModel.WasHosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
            appDomainHandlerType="System.ServiceModel.WasHosting.MsmqIntegrationAppDomainProtocolHandler, System.ServiceModel.WasHosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
            validate="false" />
    </protocols>

我在调试应用程序时没有问题,但现在我总是遇到这个错误

有人能帮我吗


非常感谢您抽出时间

似乎您已将此protocols元素放置在允许的文件之外(或只是复制粘贴了根web.config):请参阅中的machineToWebRoot,谢谢!你提供的链接非常有用。再次感谢您的快速而精彩的回答=)