Quantcast
Channel: SQL Server Master Data Services forum
Viewing all articles
Browse latest Browse all 1311

Calling Master Data Services Webservice API from client

$
0
0

Hi there,

I am trying to call the MDS webservice API. When I do this from the local machine it works.

But when I try this from another machine in the same domain it fails.

Error message:

The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.

Server config:

<system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="mdsWsHttpBehavior">
          <!-- Enable to allow clients to retrieve metadata (WSDL) about the service endpoints. -->
          <!-- If not using SSL (httpGetEnabled="true" httpsGetEnabled="false") to expose service metadata.-->
          <!-- If SSL is being used (httpGetEnabled="false" httpsGetEnabled="true") to expose service metadata.-->
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false"/>
          <!-- Enable to allow clients to see service exception details -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
          <serviceThrottling maxConcurrentSessions="400"/>
          <dataContractSerializer maxItemsInObjectGraph="999999999"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <wsHttpBinding>
        <binding name="mdsWsHttpBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
          <readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647"/>
          <!--Non-SSL implementations.-->
          <security mode="Message">
            <message clientCredentialType="Windows"/>
          </security>
          <!--SSL implementations-->
          <!--<security mode="Transport">-->
          <!--<message clientCredentialType="Windows" />-->
          <!--</security>-->
        </binding>
      </wsHttpBinding>
      <basicHttpBinding>
        <binding name="mdsBasicHttpBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
          <readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647"/>
          <!-- Non-SSL implementations.-->
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows"/>
          </security>
          <!-- SSL implementations -->
          <!--<security mode="Transport">-->
          <!--<transport clientCredentialType="Windows" />-->
          <!--</security>-->
        </binding>
      </basicHttpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="mdsWsHttpBehavior" name="Microsoft.MasterDataServices.Services.Service">
        <endpoint binding="wsHttpBinding" bindingConfiguration="mdsWsHttpBinding"
          bindingNamespace="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09"
          contract="Microsoft.MasterDataServices.Services.ServiceContracts.IService" />
        <endpoint address="bhb" binding="basicHttpBinding" bindingConfiguration="mdsBasicHttpBinding"
          bindingNamespace="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09"
          contract="Microsoft.MasterDataServices.Services.ServiceContracts.IService" />
      </service>
      <service behaviorConfiguration="mdsWsHttpBehavior" name="MDS1">
        <!--<endpoint binding="wsHttpBinding" bindingConfiguration="mdsWsHttpBinding"
          bindingNamespace="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09"
          contract="Microsoft.MasterDataServices.Services.ServiceContracts.IService" />-->
        <endpoint address="bhb" binding="basicHttpBinding" bindingConfiguration="mdsBasicHttpBinding"
          bindingNamespace="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09"
          contract="Microsoft.MasterDataServices.Services.ServiceContracts.IService" />
      </service>
    </services>
  </system.serviceModel>

Client configuration:

 <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IService">
                    <security mode="TransportCredentialOnly">
                        <transport clientCredentialType="Windows" />
                    </security>
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://euazabcsp001.azurebusinesscloud.net:8081/Service/Service.svc/bhb"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService"
                contract="MSService.IService" name="BasicHttpBinding_IService" />
        </client>
    </system.serviceModel>


Viewing all articles
Browse latest Browse all 1311

Trending Articles