Solved

AfterReceiveRequest in WCF giving encrypted request data

Posted on 2009-03-31
4
890 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

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

688 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