1

I am trying to access my WCF service that resides on a sub-domain on my website. The properties of server on which sub-domain is situated is as follows:

  • It has basic authentication
  • It has 4.0 .NET version

But the problem is, when I try to access the service like http://mysubdomain.mydomain.com/Service1.svc it gives me

500 - Internal server error.

Although it is working fine from localhost. I also changed the properties in the web.config as:

<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>

Please tell me the solution to this.

pnuts
  • 58,317
  • 11
  • 87
  • 139
Aishwarya Shiva
  • 3,460
  • 15
  • 58
  • 107
  • Can check additional information in the event logs? – pinoy_ISF Aug 12 '13 at 13:39
  • Your endpoint address in your service is: http://mysubdomain.mydomain.com/ServiceCore.svc but the URL you're trying to access, according to your post, is http://mysubdomain.mydomain.com/Service1.svc - basically a URL mismatch. – Brian Aug 13 '13 at 08:41
  • @Brian: I changed that but the result is the same as of before – Aishwarya Shiva Aug 13 '13 at 10:30
  • I understand ... you might try turning on the trace/logging on the client and host sides, or using fiddler to see the actual requests and responses. That's what I'd do. http://stackoverflow.com/questions/4271517/how-to-turn-on-wcf-tracing – Brian Aug 13 '13 at 10:34

1 Answers1

-1

It is worth checking if your DNS suffixes are correctly configured. I have seen it to due to a silly spelling mistake as well!