Click here to Skip to main content
15,305,361 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all, I'm new with wcf, just finished my first wcf service. However when I try to use it in another application an exception is generated

"SOAP security negotiation with 'http://dummy-server/OnlineWebService/wcfOnlinePullOutServiceLibrary.OnlinePullOutBranchPaymentService.svc' for target 'http://dummy-server/OnlineWebService/wcfOnlinePullOutServiceLibrary.OnlinePullOutBranchPaymentService.svc' failed. See inner exception for more details."

The wcf is deployed in a local pc, we have no domain just a work group.
Below is the web.config of wcf
XML
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  
  <configSections>
    <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
      <section name="wcfOnlinePullOutServiceLibrary.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 

allowExeDefinition="MachineToLocalUser" requirePermission="false" />
    </sectionGroup>
  </configSections>
  
  <connectionStrings>
    <add name="OnlineShop"  connectionString="Data Source=192.168.15.25;Initial Catalog=PackageDB;User ID=sa;Password=;Integrated Security=False" />
    <add name="HeadOffice"  connectionString="Data Source=server-it;Initial Catalog=BoardwalkDbAcc;User ID=sa;Password=;Integrated Security=False"/>
  </connectionStrings>

  <appSettings>
    <add key ="OnlineShopDataSource" value ="192.168.15.25"/>
    <add key ="OnlineShopCatalog" value ="PackageDb"/>
    <add key ="OnlineShopUserId" value ="sa"/>
    <add key ="OnlineShopPassword" value =""/>
  </appSettings>
    
  <system.web>
    <compilation debug="true" />
  </system.web>
  <!-- When deploying the service library project, the content of the config file must be added to the host's 
  app.config file. System.Configuration does not support config files for libraries. -->
  <system.serviceModel>
    <services>
      <service name="wcfOnlinePullOutServiceLibrary.OnlinePullOutBranchPaymentService">
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8732/Design_Time_Addresses/wcfOnlinePullOutServiceLibrary/OnlinePullOutBranchPaymentService/"   />
          </baseAddresses>
        </host>
        <!-- Service Endpoints -->
        <!-- Unless fully qualified, address is relative to base address supplied above -->
        <endpoint address=""  binding="wsHttpBinding" contract="wcfOnlinePullOutServiceLibrary.IOnlinePullOutBranchPayment">
          <!-- 
              Upon deployment, the following identity element should be removed or replaced to reflect the 
              identity under which the deployed service runs.  If removed, WCF will infer an appropriate identity 
              automatically.

          <identity>
            <dns value="localhost"/>
          </identity>
          -->
        </endpoint>
        <!-- Metadata Endpoints -->
        <!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. --> 
        <!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, 
          set the value below to false and remove the metadata endpoint above 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="True" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

</configuration>




Here is the app.config of the application consuming the wcf
XML
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <wsHttpBinding>
                <binding name="WSHttpBinding_IOnlinePullOutBranchPayment" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                    allowCookies="false">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="Message">
                        <transport clientCredentialType="Windows" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="Windows" negotiateServiceCredential="true"
                            algorithmSuite="Default" />
                    </security>
                </binding>
            </wsHttpBinding>
        </bindings>

      <client>
            <endpoint address="http://dummy-server/OnlineWebService/wcfOnlinePullOutServiceLibrary.OnlinePullOutBranchPaymentService.svc"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IOnlinePullOutBranchPayment"
                contract="ServiceReference1.IOnlinePullOutBranchPayment" name="WSHttpBinding_IOnlinePullOutBranchPayment">
              <!--
                <identity>
                  <servicePrincipalName value=""/>
                </identity>
              -->
            </endpoint>
        </client>


      
    </system.serviceModel>
</configuration>



Thanks in advance
Posted

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900