Skip to content
Advertisement

c# posting to PHP working on localhost, but not on production server

I need to post a username and a password, to a server to validate it, then return a true or false. This is fully working on my local machine, but when I try it on the production server, it is not receiveing the POST values (it is returning the “noPOST” back to the c# code).

C# code:

JavaScript

PHP Code:

JavaScript

[EDITED]

C#:

JavaScript

PHP Code:

JavaScript

Advertisement

Answer

You may have two issues:

1- Something related to proxy or reverse proxy, redirector in front of your PHP service in your production environment.

2- Type of sending the request, Solution: Use HttpClient and check these steps for more details.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement