We use C# to POST data to SF's W2L, to the regular HTTPS URL. This has been running fine for years.
Suddenly, our HTTP requests no longer registers a new lead in SF. Our application did not change. I've tried the following:
- Verified the URL to post to. We can access it just fine. No connectivity problem.
- Generated a new webform in SF to verify the fields we are using are still valid. All checks out. Field definitions are fine.
- Used that new webform in a browser to generate a test lead. This worked. Our SF setup is fine. No trouble with validations etc.
- Looked at the response from our HTTP POST in C#. We get a normal HTTP response, no errors. Our POST works fine on HTTP level.
- Turned on debug mode by supplying the necessary values (debug=1, etc.). This yields the expected result: a 200 OK with basic content including the message "Your request has been queued". Debug mode does not give us any extra insight.
- Changed SF's URL (the address we POST to) from HTTPS to HTTP. This works: leads are coming in. We're seeing different results between posting to HTTP and HTTPS, when posted using C#.
- Captured the HTTP request in Fiddler, and replayed it there. Works fine. In Fiddler, changed the URL again to HTTPS and replayed it. Also works fine. The request we create has the right content, whether posted to HTTP or HTTPS, including HTTP headers and body content.
- We can reproduce this behavior on Windows servers and Windows 10 machines. We logged tracing data from System.Net, no errors. The HTTPS request concludes successfully. We get a successful connection and HTTP response, so it doesn't seem a TLS/SSL issue.
We've now resorted to using Salesforce's HTTP URL, but we really prefer to stick to HTTPS. We have no idea why this suddenly stopped working from one day to the next. Any ideas for further debugging very much appreciated, before we dig into Wireshark next.