سؤال

I have a WCF service with webHttpBinding binding that works fine in Visual Studio 2010 / local IIS. The service has only one POST method that my separate web app project invokes via .NET's HttpWebRequest object. JSON is used for request and response. Request and response contain objects translated into and from JSON by DataContractJsonSerializer.

Once I deploy the service to a different Windows Server 2008 R2 machine on the same network, it generates "400 Bad Request" in response to the exact same calling code that works fine locally. By "calling code" I mean my web app running in Visual Studio.

No problems viewing the .svc file via a browser.

The request is less than one kB so it doesn't seem like size is an issue. Just in case I also tweaked the service's Web.config to allow for larger requests but that hasn't helped.

هل كانت مفيدة؟

المحلول

Resolved this shortly after posting question. Should clear things up.

My Cisco RV220W got confused. It wouldn't route the request properly, but the nature of what exactly it was doing and why the behavior was intermittent is beyond me. Rebooting it solved my problem.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top