Welcome to MSDN Blogs Sign in | Join | Help

Accessing the Http Query String from a service method.

I'm trying to access the query string used by the client when contacting my service. How can I do this? 

You can access the query string through the HttpRequestMessageProperty.

OperationContext context = OperationContext.Current;
MessageProperties properties = context.IncomingMessageProperties;

HttpRequestMessageProperty requestProperty = properties[HttpRequestMessageProperty.Name] as HttpRequestMessageProperty;

string queryString = requestProperty.QueryString; 
Published Friday, June 22, 2007 2:40 PM by phenning
Filed under:

Comments

No Comments
Anonymous comments are disabled
 
Page view tracker