400 bad requst

Topics: Web Api
Sep 22, 2011 at 5:36 PM

My client getting 400 Bad request when send URL in below format:

http://localhost:8080?ipAddress=10.10.9.28&FunctionName=Register

If I am send with / like http://localhost:8080/?ipAddress=10.10.9.28&FunctionName=Register it is working well.

The code is

var host = new HttpServiceHost(typeof(DirectClientService), "http://localhost:8080" );  //http://localhost:8080/ - is same"
host.Open();

and IService:

 [OperationContract]
        [WebGet(UriTemplate = "?FunctionName=Register&ipAddress={ipAddress}&port={port}")]
        string RegisterAction( string telesetNumber, string ipAddress); 

Please help urgent

Thanks