views:

47

answers:

1

I am trying to port some code that is based on WSE3.0 to WCF. Basically, the old code has the following configuration:

<microsoft.web.services3>
    <diagnostics>
      <trace enabled="true" input="InputTrace.webinfo" output="OutputTrace.webinfo" />
    </diagnostics>
    <tokenIssuer>
      <statefulSecurityContextToken enabled="false" />
    </tokenIssuer>
</microsoft.web.services3>

When calling the same service through my "Service Reference" I get this error:

Request does not contain required Security header

My binding looks like this:

<basicHttpBinding>
    <binding name="LegalUnitGetBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
                receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
                bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                useDefaultWebProxy="true">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                    maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <security mode="Transport">
                </security> 
     </binding>
</basicHttpBinding>

From what I have understood, the service I'm calling only requires an SSL connection, since it receives a username and password as part of a request parameter.

Any help or suggestions would be greatly appreciated.

A: 

You'll have to pass credentials on the client side and validate them on the server side, I guess you are using IIS to Host? Instead of rehashing - here is an MVP post that should get you pointed in the right direction.

Key change that will get you thinking in your config file:

<security mode="TransportWithMessageCredential">
...
</security>
RandomNoob
Well, the the service I'm calling is a java service hosted by a public office, and I have no insight whatsoever with regards to its implementation. Needless to say, their documentation is almost non-existing. I can call it from .net 2.0 using WSE3.0 without setting any credentials on the client.
klausbyskov