我正在尝试访问驻留在我网站子域上的 WCF 服务。子域所在服务器的属性如下:
- 它具有基本身份验证
- 它有 4.0 .NET 版本
但问题是,当我尝试访问像http://mysubdomain.mydomain.com/Service1.svc这样的服务时,它给了我
500内部服务器错误。
虽然它在本地主机上运行良好。我还将 web.config 中的属性更改为:
<services>
<service behaviorConfiguration="WCFService.Service1Behavior"
name="WCFService.WrangleCore">
<endpoint address="http://mysubdomain.mydomain.com/ServiceCore.svc" binding="basicHttpBinding" contract="WCFService.IService1">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WCFService.Service1Behavior">
<!-- To avoid disclosing metadata information, set the value below to false before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
请告诉我这个问题的解决方案。