I’m using a service that is using username token authentication and it’s built in wse 3.0.
http://msdn2.microsoft.com/en-US/library/aa480575.aspx
I am trying to interop with it via wcf like so:
http://msdn2.microsoft.com/en-us/library/ms730299.aspx
Code Snippet
the vendor who makes the service has given me the following policy file
<policies xmlns="http://schemas.microsoft.com/wse/2005/06/policy">
<extensions>
<extension name="usernameOverTransportSecurity" type="Microsoft.Web.Services3.Design.UsernameOverTransportAssertion, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<extension name="requireActionHeader" type="Microsoft.Web.Services3.Design.RequireActionHeaderAssertion, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</< SPAN>extensions>
<policy name="InsertNameHere">
<usernameOverTransportSecurity />
<requireActionHeader />
</< SPAN>policy>
</< SPAN>policies>
However, the services are NOT on SSL they’re hosted on basic HTTP.
I wrote the following client to try to talk to the service
Code Snippet
Console.Write("Logging in...");
//Configure an anon binding so we can log in
WseHttpBinding binding = new WseHttpBinding();
binding.LoadPolicy("wse3policyCache.config", "InsertNameHere");
LoginServiceSoapClient loginClient =
new LoginServiceSoapClient(binding,
new EndpointAddress("HTTP://myserver/myLoginService.asmx") );
Guid guid = loginClient.LogIn("username", "myP4ssw0rd",true);
Console.WriteLine("Logged in!");
Console.WriteLine(" (press any key to exit) ");
Console.ReadKey();
Now I’m stuck because it says that http isn’t valid, but if I use https it can’t find the certificate, because there isn’t one.
Thanks,