AfterReceiveRequest in WCF giving encrypted request data

i am trying to something similer to
http://weblogs.asp.net/paolopia/archive/2007/08/23/writing-a-wcf-message-inspector.aspx
when I receive a request from wcf client i need to capture it before invoking the actual operation at the serverside.
i am successful in receiving it, but i am getting the data encripted.
how can i get the request details unencrypted at that stage?
Here is the method i am talking about...
1  public object AfterReceiveRequest(ref Message request, IClientChannel channel, InstanceContext instanceContext)
2   {
3        MessageBuffer buffer = request.CreateBufferedCopy(Int32.MaxValue);
4        request = buffer.CreateMessage();
5        Console.WriteLine("Received:\n{0}", buffer.CreateMessage().ToString());
6        return null;
7    }

Please help, Thanks in advance.
x1877Asked:
Who is Participating?
 
ripahoratiuConnect With a Mentor Commented:
Set the security of WSHttpBinding to Transport or none. WSHttpBinding is secured at Message level, by default.
0
 
ripahoratiuCommented:
It is supposed that the Messages Inspectors methods are called before encryption/after decryption so that's pretty weird.
What kind of encryption do you use?
0
 
x1877Author Commented:
i am not using any encryption of my own. just using WSHttpBinding.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.