I have a web service that gets a string as parameter and returns string. This service is located on server1. On server2 I have a little (2 line) console application to test this web service and everything works ok. When I call the same web service (using the same settings - no settings, url is the same, everything about web service part is the same) I get "400 bad request" error. In the same function I have something like this:
using(var ctx = ClientContext(siteUrl)) // sharepoint client object model
{
using(var db = SomeEntitiesContext()) // entities context
{
...
var webservice = MyService.MyServiceClass();
foreach(var item in items)
{
var res = webservice.MyMethod(myinput); //here I get 400 bad request error
}
}
}
Is it possible that other contexts have mixed up something? It's strange that a console based testing app is working.