小编use*_*651的帖子

WCF Web服务错误:无法激活该服务,因为它不支持ASP.NET兼容性

我正在尝试创建一个宁静的wcf Web服务.当我尝试通过客户端连接到服务时,我收到以下错误:

无法激活该服务,因为它不支持ASP.NET兼容性.为此应用程序启用了ASP.NET兼容性.在web.config中关闭ASP.NET兼容模式,或者将AspNetCompatibilityRequirements属性添加到服务类型,其RequirementsMode设置为"Allowed"或"Required".

其他人遇到了问题,但他们通过更改web.config来修复它.我已经实现了他们的修复,但问题仍然存在.这是我的web.config:

<system.serviceModel>
    <behaviors>
      <endpointBehaviors>
        <behavior name="WebBehavior" >
           <webHttp />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="MyServiceBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service behaviorConfiguration="MyServiceBehavior" name="myfirstwcf">
        <endpoint address="ws" binding="basicHttpBinding" 
                  contract="Imyfirstwcf" />
        <endpoint address="ws2" binding="wsHttpBinding" 
                  contract="Imyfirstwcf" />
        <endpoint address="" behaviorConfiguration="WebBehavior" 
                  binding="webHttpBinding" 
                  contract="Imyfirstwcf" />
        <endpoint address="mex" binding="mexHttpBinding" 
                  contract="IMetadataExchange" />
      </service>
    </services>
    <serviceHostingEnvironment aspNetCompatibilityEnabled= "true"
      multipleSiteBindingsEnabled="true"  />
  </system.serviceModel>
Run Code Online (Sandbox Code Playgroud)

asp.net rest wcf

55
推荐指数
2
解决办法
8万
查看次数

如何在Visual Studio 2012中将ajaxcontroltoolkit添加到工具箱

我在.NET 4和Visual Studio 2010中使用了ajaxtoolkit,我能够在工具箱中添加一个新选项卡,并将ajaxtoolkit控件添加到工具箱中.我如何在Visual Studio 2012中执行此操作?

我已经在NuGet中添加了ajaxtoolkit ,但是我想在工具箱中看到控件,所以我可以将控件拖入.这是怎么做到的?

ajaxcontroltoolkit visual-studio-2012

15
推荐指数
2
解决办法
8万
查看次数