我正在尝试访问驻留在我网站上的子域中的WCF服务。子域所在的服务器的属性如下:
但问题是,当我尝试访问像http://mysubdomain.mydomain.com/Service1.svc这样的服务时,它会给我
500 - 内部服务器错误。
虽然它从localhost工作正常。我还将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>
请告诉我解决方案。
答案 0 :(得分:-1)
值得检查您的DNS后缀是否正确配置。我也看到是由于愚蠢的拼写错误!