Solved

Issue with WCF security

Posted on 2011-02-27
3
484 Views
Last Modified: 2012-05-11
Hi,

  I`ve created a WCF service (http://wcf.boaviagemdistribuidora.com.br/McSoftPersistenciasSistema.svc?wsdl) and it works fine in the development machine. When I put it in Internet I get the message that says "No connection could be done because the destin machine actively refused my IP".

  The binding I'm using is wsHttpBinding. In the server the configuration is:

  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="McSoftPersistenciasBasico">
          <serviceMetadata httpGetEnabled="true" />
          <!-- Colocar FALSE para receber as falhas -->
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <!-- Modulo de Sistema -->
      <service name="McSoft.Persistencias.Sistema.DadosAtivos" behaviorConfiguration="McSoftPersistenciasBasico" >
        <endpoint address="" binding="wsHttpBinding" contract="McSoft.Persistencias.Sistema.IDadosAtivos" />
        <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
      </service>

  What is needed in the client application? Seems to be a password... But I don't know how to set it up.

  The clients configuration is:

  <system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding" 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="2147483647"
            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>
      <!-- Module Sistema -->
      <endpoint address="http://wcf.boaviagemdistribuidora.com.br/McSoftPersistenciasSistema.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding"
                contract="ServiceReferenceSistema.IDadosAtivos" name="WSHttpBinding_IDadosAtivos">
      </endpoint>


  Thanks,
  Marco Castro
0
Comment
Question by:MarcoCastro
3 Comments
 
LVL 18

Accepted Solution

by:
DarrenD earned 500 total points
ID: 34995208
Hi,

Are you using certificates for security?

This seems to be an issue.

Have a look in this document and see if it helps:
http://wcfsecurityguide.codeplex.com/releases/view/15892

Thanks,

Darren

0
 
LVL 8

Expert Comment

by:cubaman_24
ID: 34996213
Hello:
I would take a look at the system/network firewall, as the message says that connection to destination have been refused..
Best regards.
0
 

Author Closing Comment

by:MarcoCastro
ID: 34999413
Good reference.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Split string on commas but not when enclosed in parentheses 7 48
XML & .net 5 41
Definitions and default visual studio colors 5 58
Connection String 16 43
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now