zoukankan      html  css  js  c++  java
  • WCF异常: 提供的 URI 方案“https”无效,应为“http”。 参数名: via

    前几天,在用wcf服务是,遇到这么一个问题:WCF异常: 提供的 URI 方案“https”无效,应为“http”。 参数名: via

    本身对wcf不是很熟悉,在网上查找一番。终于解决问题。如有遇到此类问题,希望能有所帮助。

    原因解析:

    wcf原引用地址:https://192.168.1.1:8090/temp/sitservice

    后因为服务地址改为:http://192.168.1.2:8090/temp/sitservice

    然后运行就出现了上述的错误(我只改了web.config 的引用服务地址,别的没改)。

    解决:

    把这个节点

    <httpsTransport manualAddressing="false" maxBufferPoolSize="524288"
    maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"
    bypassProxyOnLocal="false" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard"
    keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"
    realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
    useDefaultWebProxy="true" />
    

    改为http的

    <httpTransport manualAddressing="false" maxBufferPoolSize="524288"
    maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"
    bypassProxyOnLocal="false" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard"
    keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"
    realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
    useDefaultWebProxy="true" />

    重新编译,运行成功。

  • 相关阅读:
    Non HTTP response code: org.apache.http.conn.HttpHostConnectException/Non HTTP response message
    elasticjobliteconsole的部署使用
    Loadrunner压测简易操作
    TestNg+Allure框架搭建
    bouncycastle类打包报错解决方法
    ie developer tools
    JS 三级联动 下拉列表
    HP大中华区总裁孙振耀退休感言
    spring如何配置和使用
    java 时间格式转换
  • 原文地址:https://www.cnblogs.com/for917157ever/p/4597551.html
Copyright © 2011-2022 走看看