首页 新闻 会员 周边

WCF异常: 提供的 URI 方案“https”无效,应为“http”。 参数名: via

0
悬赏园豆:20 [已解决问题] 解决于 2012-12-20 16:12

提供的 URI 方案“https”无效,应为“http”。
参数名: via

David·Li的主页 David·Li | 初学一级 | 园豆:76
提问于:2012-12-17 21:23
< >
分享
最佳答案
0

哎,我在客服端添加代理引用时候的bing定策略定义忘修改了造成这个错。。

David·Li | 初学一级 |园豆:76 | 2012-12-19 10:54
其他回答(3)
0

是的service中的配置,是不是配置了basichttpbind,但是你的配置的终结点的地址确实https开头的

你可以贴出你的配置来看看

收获园豆:10
chenping2008 | 园豆:9836 (大侠五级) | 2012-12-17 21:34

<service behaviorConfiguration="Service.CupPayDotnet.CupPamentService"
name="Service.CupPayDotnet.CupPamentService">
<endpoint address="" binding="basicHttpBinding" contract="Service.CupPayDotnet.ICupPamentService" bindingConfiguration="myUserSafeBinding">
<identity>
<dns value="Service.CupPayDotnet.CupPamentService" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>
</services>

<binding name="myUserSafeBinding">
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="None" />
<message clientCredentialType="UserName" />
</security>
</binding>

<behavior name="YaMengESB.CupPayDotnet.CupPamentService">
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceCredentials>
<clientCertificate>
<authentication certificateValidationMode="None" />
</clientCertificate>
<serviceCertificate findValue="services.ymcft.com" storeLocation="LocalMachine"
storeName="My" x509FindType="FindBySubjectName" />
<userNameAuthentication userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="YaMengESB.UserValidator,YaMengESB" />
<issuedTokenAuthentication allowUntrustedRsaIssuers="true" />
</serviceCredentials>
</behavior>

支持(0) 反对(0) David·Li | 园豆:76 (初学一级) | 2012-12-17 21:56

如上配置,我设置了basichttpbind

支持(0) 反对(0) David·Li | 园豆:76 (初学一级) | 2012-12-17 21:57

我在serviceMetadata节点和endpoint节点的配置url方案都是https

支持(0) 反对(0) David·Li | 园豆:76 (初学一级) | 2012-12-17 21:58

@大灰机: 可以改回http开头吗? 不行的话,参考这个:

http://www.cnblogs.com/artech/archive/2011/06/02/Authentication_042.html

你应该是配置了baseaddresss的吧

支持(0) 反对(0) chenping2008 | 园豆:9836 (大侠五级) | 2012-12-18 07:26
0

把 bindingConfiguration="myUserSafeBinding" 这个去掉。

收获园豆:10
Launcher | 园豆:45045 (高人七级) | 2012-12-18 09:24
0

选中你的*.Web测试项目——》右键 选择设为启动项,——》然后将 *.aspx 设为起始页。然后再重新运行就可以查看运行结果了,今天遇到了所以记录一下,希望能对别人有所帮助

logitechyan | 园豆:202 (菜鸟二级) | 2015-06-16 14:48
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册