WCF/WF - Bad request error in wcf service - Asked By pankaj singh on 22-Mar-13 02:39 AM

hi Expert,

I made a web service in WCF IN GET METHOD,

when i call it from browser i receive bad request error.
Saran Raj replied to pankaj singh on 22-Mar-13 09:50 AM
Hi, Post your WCF GET method code, then only, we can refer... and try this format.

  [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
    public class ContactLayoutService
    {
[WebGet(UriTemplate = "Folder", ResponseFormat = WebMessageFormat.Json)]
        public List<ContactFolder> GetFolder()
        {

return new List<ContactFolder>();
}
    }

in global.asax
 protected void Application_Start(object sender, EventArgs e)
 {
RouteTable.Routes.Add(new ServiceRoute("ContactLayoutService", new WebServiceHostFactory(), typeof(ContactLayoutService)));
 }

call from javascript 
url:"ContactLayoutService/Folder"