How to Resolve HTTP Status 400 - Bad Request - https

I am trying to access an URL to an application provided by my organisation (will not be able to disclose URL). Majority of my colleagues are able to access it fine. However, I keep encountering the "HTTP Status 400 - Bad Request" error.
I have tried the fixes from https://www.itpro.com/infrastructure/network-internet/359323/what-is-http-error-400-and-how-do-you-fix-it but this issue still persists. I have tried accessing it when connected to external and corporate network and using different types of browsers.
Any idea how can I resolve it?

Related

Postman 503 Service Unavailable

I tried using postman to test my springboot project. When I sent the request, postman made a 503 error, but when I sent the request in the browser, it successfully got a response.
How to solve this problem?
I had the same issue I resolved it like this :
Postman settings
go to the top right of your postman window Settings > proxy > use the system proxy
for my case I added another proxy so I had to desable it when making a local api call. good luck !
503 Service Unavailable clearly states the server is overloaded, you may be running out of memory. Try again or try to restart the server. The post method will say bad request only. So you should try restarting the server if it is yours, or retry after sometime if it is a 3rd party service.
And also can you check and make sure your postman proxy is turned off. Even that causes problems like these sometimes. Check that in proxy tab.

Cordova ajax call kCFErrorDomainCFNetwork error 311

Anyone encountered this error? kCFErrorDomainCFNetwork error 311?
I wrote a simple cordova application running in iPad (iOS 9 up). This applications calls an HTTPS api but throws this error kCFErrorDomainCFNetwork error 311.
Pleas note that the HTTPS Server has a valid CA Issued SSL Certificate.
I googled a lot on this error but without any luck and only managed to found this cfStreamErrorHTTPSProxyFailureUnexpectedResponseToCONNECTMethod that has an int value of 311 and it says that
The HTTPS proxy returned an unexpected status code, such as a 3xx
redirect
Indeed the resource that i am invoking is returning a 302 which unfortunately i have no control of.
And to access the https server, i have to specifically connect to a wifi proxy where the IP address is whitelisted in the https server.
I hope someone from this great community could provide me some light on this error.
Thank you.
I also have received the same error. The problem is that you are accessing network through a proxy which needs to be authenticated before you send a request.
In your case, generally if you are accessing internet in the system browser, you might have proxy settings(along with authentication) in your browser or system preferences -> network -> Advanced -> Proxies.
In order to address the authentication issues while URL requests, Apple has given documentation in this regard - https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/URLLoadingSystem/Articles/AuthenticationChallenges.html.
For a simple model implementation just refer to Simple example of NSURLSession with authentication

Response for preflight has invalid HTTP status code 404

This is the responce i am getting when trying to upload a file from my client(PHP),My server is on WebApi which is hosted in one server.In my webapi i have allowed all CORS related things still i am getting this error.
Have you checked this tutorial?
Maybe when you say
In my webapi i have allowed all CORS related things
you didn't do that correctly, or maybe you enabled too many options at the same time.
It's hard to give you more details without access to your actual configuration.
There are also many posts on the same subject here on SO, have you checked them?

Error in WebRequest

I'm working with WebClient for some time now. (using the Mango SDK)
Each time I have an error, the error message is always "Not Found". Either the error is due to login problem, server or page not found. Any error code >= 400 cause the same Exception with the same message and no data.
I tried to use the WebRequest/WebResponse but it seems the problem is always the same.
I mean, I know how to write it correctly in C# (for desktop), but on windows phone, I have no way to access the error code nor the response body.
I found many posts talking about the problem, but no solutions are pointed.
Does anyone have a solution or a workaround (even a dirty one...) I'm open to any suggestion.
That (very misleading) error is often caused by an underlying HTTP error.
If you are using HTTPS, it could be because it's a self-signed (or otherwise unsupported) certificate. You can temporarily get around this by emailing the certificate to an account on the phone, but this won't fly in the marketplace.
If the requests aren't HTTPS, you can run Fiddler to find out what the underlying error is. (Pro tip: The WP emulator will only the use Fiddler if Fiddler was running when it started up so you may have to close it down).
To access the data, you need to get the WebException (it may be the InnerException of what is being thrown) and then you can access the Response

"The remote server returned an error: (401) Unauthorized." When trying to access Exchange via Webdav

I asked another question earlier about a 400 error. (http://stackoverflow.com/questions/6099557/the-remote-server-returned-an-error-400-bad-request-when-trying-to-access-e)
While waiting for responses, I tried a few other things and have now come across another unhelpful error. ("The remote server returned an error: (401) Unauthorized.").
I am trying to connect to http://mailserver/owa/. When I paste this URL into my browser, and type my credentials, I can get logged in just fine. When I try to connect with the same credentials through WebDav, I get the 401 error. How do the same credentials work one way, but not another way?
I tried using the authenticate method found here: http://blog.mbcharbonneau.com/2006/10/26/using-net-and-webdav-to-access-an-exchange-server/
I still get the same 401.
This seems like it should be so straightforward, yet all I can find out there are forums of people with the same problem. Nobody can provide and answer or working example. Has anyone actually ever been able to do this successfully before!?

Resources