> Hello Martin,
>
> Here is an article may be helpful on your question, you may take a look:
>
> http://www.codeproject.com/soap/WSE30UsernameAssertion.asp
Luke,
Indeed this is the one resource in the Internet I can find at all on how to
use custom headers.
However the article shows how to create custom assertion, but my question
actually was is how to encrypt headers using policy config file. This was
possible with WSE 2.0 using the Confidentiality and MessageParts elements.
Is there a similiar way of encrypting custom headers in WSE 3.0?
My second question was:
Does the only way to create custom header use SecurtyPolicyAssertion? Adding
new custom header is not very security related and it is a little unnatural
to use SecurityPolicyAssertion. I guess that there are also other situations
in which the same question may apply.
I have some thoughts on how accurate this article may be given this code
example:
----
// create web service proxy
// NOTE!!! When updating web reference in Visual Studio,
// don't forget to change its base class
// to Microsoft.Web.Services3.WebServicesClientProtocol then
WseSample.Service srv = new WseSample.Service();
----
The author should have been used the new class WseSample.ServiceWse that is
created when you enable WSE support in your project and update web reference
client.
Thanks,

Signature
Martin Kulov
http://www.codeattest.com/blogs/martin
MVP, MCT, MCSD, MCPD
Luke Zhang [MSFT] - 02 Jan 2007 09:55 GMT
I found a sample on code project which provide a way to encrypt custom SOAP
headers with Username token. You may take a look:
http://www.codeproject.com/soap/WSE30UsernameAssertion.asp?df=100&forumid=23
1872&exp=0&select=1806252
Also, WS-I Basic Security Profile :
http://msdn.microsoft.com/practices/default.aspx?pull=/library/en-us/dnpag2/
html/MSWSIBSP.asp
Sincerely,
Luke Zhang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Martin Kulov [MVP] - 05 Jan 2007 02:24 GMT
>I found a sample on code project which provide a way to encrypt custom SOAP
> headers with Username token. You may take a look:
[quoted text clipped - 6 lines]
> http://msdn.microsoft.com/practices/default.aspx?pull=/library/en-us/dnpag2/
> html/MSWSIBSP.asp
Luke,
there is no need to repost your answer.
thanks anyway,
Martin
Pablo Cibraro [MVP] - 08 Jan 2007 17:43 GMT
Hi Martin,
WSE 3.0 does not allow to encrypt custom headers by default. As you said, it
only allows to sign them.
If you want to encrypt custom headers, you will have to create a custom
security assertion or override one of the existing assertions. We had to do
something like that for the WS-I Basic Security Profile project, our custom
assertion is available there,
http://msdn.microsoft.com/practices/default.aspx?pull=/library/en-us/dnpag2/html
/MSWSIBSP.asp
Regards,
Pablo.
>>I found a sample on code project which provide a way to encrypt custom
>>SOAP
[quoted text clipped - 15 lines]
>
> Martin