Question : WCF standalone Http service with query string problem

Hi I am very new to WCF. I need to create a WCF service to return a value based on the query string passed in. I am testing in a browser yet it doesn't work.

For example, I have a method in the service contract called "TestMethod":
and it's defined as:

public string TestMethod()
        {

            return "you said: " + HttpContext.Current.Request.QueryString["MyParam"];
        }

I would like to be able to call this method from a browser like this:
http://localhost/Service.svc?MyParam=hello
and the xml would return the string.

Answer : WCF standalone Http service with query string problem

Is the code being executed? If not then check the value for @ServiceHost Service.

http://msdn.microsoft.com/en-us/library/aa751792.aspx


http://msdn.microsoft.com/en-us/library/aa967286.aspx

Random Solutions  
 
programming4us programming4us