Solved

AfterReceiveRequest in WCF giving encrypted request data

Posted on 2009-03-31
4
875 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
  • 2
4 Comments
 
LVL 9

Expert Comment

by:ripahoratiu
Comment Utility
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
Comment Utility
i am not using any encryption of my own. just using WSHttpBinding.
0
 
LVL 9

Accepted Solution

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

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now