i have problem with connecting WCF service with jquery in a specific condition.
Step we follow...
1. we create a WCF service (using WCF Class Library) with 2 endpoint (basichttp binding and wshttp binding).
2. Now we publish service, after publish we get 3 thing (a) bin folder (b)svc file (c) webconfig
3. now we (we have a existing website in .net 3.5) use service in our website in following manner
(a)Add bin using add reference,
(b)Use SVC file
(c)Add <system.servicemodel> section in our web site webconfig (pick from web config which we get after publishing)
when we run our website (the window tray show that our service host in aspnet local server.)
now i want to use service via (a) jquery (b) code behind (which we have done).
When we try to connect and use wcf service through Jquery sometime it show 500 internal server error or unsupported media type error(error codde 415).
Settings which we applied in our service
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Service1 : IService1
[WebInvoke(Method =POST, BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)]
public string Search(string name)
please help.... correct me for any type of error.
(plz ignore any english grammer mistake)
Thanks in advance....