I have a WCF service which is set up to use basic authentication over https like this:
<basicHttpBinding>
<binding name="secureTransport">
<security mode ="Transport">
<transport clientCredentialType="Basic"/>
</security>
</binding>
</basicHttpBinding>
I have also specified a custom username and password validator. When I call this service from a console application, everything works as expected. However, when I call this service from Silverlight 3, I get a login popup. In both cases, the code is the same and is as follows:
SecureRemoteBox.Service1Client client = new SecureRemoteBox.Service1Client();
client.ClientCredentials.UserName.UserName = "test";
client.ClientCredentials.UserName.Password = "pass";
The client security configuration for the console application is
<security mode="Transport">
<transport clientCredentialType="Basic" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
The client security configuration for the SL3 application is
<security mode="Transport" />
I have also tried "TransportWithMessageCredential" but with the same issue.
What am I doing wrong? Thanks.