Yes, you also need to configure the policy on the client side. There is
grants access to method without any checks". Is that one of your
"dev" <dev209@gmail.com> wrote in message
news:1156351671.175546.315150@i3g2000cwc.googlegroups.com...
> Hello Pablo,
>
> I did not configure the policy on client side. I added the policy file
> on server side only. In my client I am adding UsernameToken.
>
> Do I need to configure policy on client side?
>
> Web Service that I have implemented verfies the UsernameToken. It works
> fine as long as the client send UsernameToken. If client does not send
> UsernameToken it grants access to method without any checks.
>
> Regards,
> dev209
>
>
>
> Pablo Cibraro [MVP] wrote:
>> Hi,
>>
>> Did you configure the policy on the client side and server side as well
>> ?.
>> In addition, you have to create a username token by code in the client
>> application and add it to the message.
>>
>> UsernameToken token = new UsernameToken("user", "password",
>> PasswordOption.SendPlainText);
>> proxy.RequestContext.Security.Add(token);
>>
>> Regards,
>> Pablo Cibraro
>>
>>
>>
>>
>> "dev" <dev209@gmail.com> wrote in message
>> news:1156291966.093370.234790@h48g2000cwc.googlegroups.com...
>> > Hello,
>> >
>> > How do I enforce that UsernameToken be passed with SOAP request to Web
>> > Service. I looked at the following thread:
>> >
>> >
http://groups.google.com/group/microsoft.public.dotnet.framework.webservices.enhancements/browse_thread/thread/3b659d7a27f280b7/724037e2293a2fb4%23724037e2293a2fb
>> >
>> > I tried using the policy file but I keep getting following exception:
>> >
>> > Message "System.Web.Services.Protocols.SoapHeaderException: Server
>> > unavailable, please try later ---> System.ApplicationException: An
>> > error occured processing an outgoing fault response\n --- End of
>> > inner exception stack trace"
>> >
>> > Any ideas?
>> >
>> > Regards,
>> > dev209
>> >
>