【发布时间】:2015-10-14 03:11:00
【问题描述】:
我目前有一个独立的网络服务,一切都很好,除非我尝试使用远程机器上的一种方法。
我正在使用 wcftestclient 进行测试。
我收到一条身份验证错误消息:
“调用者未通过服务的身份验证”
我可以从远程计算机访问 Web 服务,这些方法填充在 wcftestclient 中,但是当我尝试调用它时,我得到了身份验证错误。
任何帮助将不胜感激。
谢谢,
这是我的 app.config 文件:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<!-- This section is optional with the new configuration model
introduced in .NET Framework 4. -->
<service name="Microsoft.ServiceModel.Samples.CalculatorService" behaviorConfiguration="CalculatorServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000/ServiceModelSamples/service"/>
</baseAddresses>
</host>
<!-- this endpoint is exposed at the base address provided by host: http://localhost:8000/ServiceModelSamples/service -->
<endpoint address="" binding="wsHttpBinding" contract="Microsoft.ServiceModel.Samples.ICalculator" />
<!-- the mex endpoint is exposed at http://localhost:8000/ServiceModelSamples/service/mex -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="CalculatorServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="False"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
【问题讨论】:
-
您是否尝试将
includeExceptionDetailInFaults设置为true?这可能有助于为您指明正确的方向
标签: c# web-services wcf web service