Let's assume that i have simple WCF service defined
[OperationContract, WebInvoke(Method = "GET", UriTemplate = "*")]
string TestMe ()
and simple http module to rewrite urls
context.BeginRequest += (s,e)=>{
var ctx = HttpContext.Current;
var method = ctx.Request.AppRelativeCurrentExecutionFilePath.RemoveFirst("~/");
var args = ctx.Request.QueryString.ToString();
ctx.RewritePath("~/MyService.svc", method, args, false);
}
So each call to the method will be translated into TestMe method with parameters
Now i want to post entire request here,
[OperationContract, WebInvoke(Method = "POST", UriTemplate = "*")]
string TestMe (Stream request)
For this call RewritePath not passing stream being posted by the service requester and i was unable to find a way to workaround it. How rewrite url and keep original request byte array being transfered?