Java https works but C# doesn't for same request -


i'm converting java program send https post request 3rd party server in internet.

  1. java program run in pc , works fine , connect server.
  2. then run c# program. server returns 400 bad request response.
  3. then use fiddler , compare content of each http request java , c# programs, , both contents same.
  4. here cannot test using http because destination server allows https

so i'm guessing can certificate issue of visual studio? have idea such case?

code

i posted code in question java vs c# http request json data

if problem occurring in java version, i'd dismiss certificates cause. in java, certificate problem result in protocol error exception ... not http response code. sending http request https port (or vice versa) wouldn't give http response.

therefore suspect there >>is<< different requests, or request headers.

the other alternatives can think of are:

  • the server giving responses depending on ip addresses, or depending on whether client certs presented, or something, or

  • you talking different server or different proxy.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -