쯩 스 시앙 2022-01-02 12:30 采纳率: 0%
浏览 4
已结题

wcf 报错,有人知道吗?

img

wcf 服务应用程序启动后,wcf 测试客户端报错,postman也访问不到,下面是我的代码

svg文件

img

cs接口文件

img

配置文件

```c#

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.7.2" />
    <httpRuntime targetFramework="4.7.2" />
  </system.web>
  <system.serviceModel>
    <serviceHostingEnvironment />
    <behaviors>
      <endpointBehaviors>
        <behavior name="webBehavior">
          <!--这里必须设置-->
          <!--<webHttp />-->
          <enableWebScript />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="metadataBehavior">
          <serviceMetadata httpGetEnabled="true" httpGetUrl="http://192.168.2.6:8888/create-ui-api" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service behaviorConfiguration="metadataBehavior" name="create_ui_api.Views.system">
        <endpoint binding="webHttpBinding" address="http://192.168.2.6:8888/create-ui-api" behaviorConfiguration="webBehavior" bindingConfiguration="webBinding" contract="create_ui_api.Controllers.systemI" />
       <endpoint address="http://localhost:8888" binding="wsHttpBinding" bindingConfiguration="wsBinding" contract="create_ui_api.Controllers.systemI" />
      <endpoint address="http://192.168.2.6:8888" binding="customBinding" bindingConfiguration="asmxbinding" contract="create_ui_api.Controllers.systemI" />
      </service>
    </services>
    <bindings>
       <customBinding>
        <binding name="asmxbinding">
          <textMessageEncoding maxReadPoolSize="2110" maxWritePoolSize="2132" messageVersion="Soap11"/>
          <httpTransport />
        </binding>
      </customBinding>
      <wsHttpBinding>
        <binding name="wsBinding">
          <security mode="None"/>
        </binding>
      </wsHttpBinding>
      <webHttpBinding>
        <binding name="webBinding" crossDomainScriptAccessEnabled="true">
        </binding>
      </webHttpBinding>
    </bindings>
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
    <!--
        若要在调试过程中浏览 Web 应用程序根目录,请将下面的值设置为 True。
        在部署之前将该值设置为 False 可避免泄露 Web 应用程序文件夹信息。
      -->
    <directoryBrowse enabled="true" />
  </system.webServer>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <entityFramework>
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
  </entityFramework>
  <connectionStrings>
    <add name="create_ui_Entities" connectionString="metadata=res://*/create-ui-sql.csdl|res://*/create-ui-sql.ssdl|res://*/create-ui-sql.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.;initial catalog=create-ui-sql;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
</configuration>

```

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 1月10日
    • 创建了问题 1月2日

    悬赏问题

    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 AT89C51控制8位八段数码管显示时钟。
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 下图接收小电路,谁知道原理
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
    • ¥15 ETLCloud 处理json多层级问题