Solved

AfterReceiveRequest in WCF giving encrypted request data

Posted on 2009-03-31
4
887 Views
Last Modified: 2012-05-06
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.
0
Comment
Question by:x1877
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Expert Comment

by:ripahoratiu
ID: 24058353
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
 

Author Comment

by:x1877
ID: 24058396
i am not using any encryption of my own. just using WSHttpBinding.
0
 
LVL 9

Accepted Solution

by:
ripahoratiu earned 500 total points
ID: 24059151
Set the security of WSHttpBinding to Transport or none. WSHttpBinding is secured at Message level, by default.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question