Error 400 happened while getting response from uri - asp.net

I have problem with use of URL. There is a bug related to web API. I need to update data in database using rest APIs. But the URL I have to update the data in database is throwing error:
“The remote server returned an error: (400) Bad Request”.
so I am not understanding whether it's wrong with my code or with URL I have. So please suggest your ideas regarding this.

Related

HERE maps Python SDK v2 failing to authenticate with the platform

I am struggling with accessing resources on the HERE platform using the Python Data SDK v2. Specifically I am trying to run the following example notebook:
https://github.com/heremaps/here-data-sdk-examples-python/blob/main/tutorials/ProcessSDIIData_platform.ipynb
It seems like I don't have access to that resource (I get a "forbidden" message when trying to open the resource in the browser). Therefore I changed the used HRN to one of the resources/catalogs that were accessible in the Data Manager. Unfortunately I am still getting the same error message:
AuthenticationException: An error occurred during authentication or authorization with HERE
platform: Status 403 -
Reason Forbidden
Response: {"error":"Forbidden","error_description":"These credentials do not authorize access"}
If anyone has an idea about how to deal with this that would help me a great deal.
These catalogs are not publicly available, hence you are getting forbidden message. You need to reach out to us via contact us form and provide the exact use case to get the access for the same. Thanks
~MS

What status code to return when an invalidly generated link has been clicked?

Consider the following situation:
I have a MVC setup where the view invokes a mapper to get a specific URL for a href attribute. The mapper holds keys to make the referencing easy.
Now the view requests an invalid key, so the mapper responds with say /invalid_url. But the dispatcher knows this URL and when a user clicks the link an error message will be displayed about how bad we feel.
But what if the Google Bot visits this invalid URL?
What would a search engine friendly status code be? I feel like 500 would be appropriate because it is a server side failure. But then this has the feeling of being a temporary error or somehow not related to the URL but to the internal mechanics. The other option that comes to mind is 404. This is also valid because the requested page does not exist. However 4xx errors are client side errors ("You requested the wrong URL. So it's basically your error"). And it just doesn't feel like a client side error to me.
Am I overthinking things? Should I just go with 404?
When I have a question like this, I refer to a site like http://www.restapitutorial.com/httpstatuscodes.html
5xx error codes imply that the server made a mistake. But you're saying the view (client-side) requested the wrong key. That sounds like a client-side error to me. While it's not the user's fault, the server doesn't know this, and the requested URL really doesn't exist. So a 404 would be appropriate.
But this is a weird case, and you should still want to fix the underlying issue of the client consistently(?) requesting a bad url.

HTTP Error 403.0 - ModSecurity Action

I m creating a code in which based on query string the URL is changing when no values are supplied in URL everything is working fine but as i supply values to URL it shows Error HTTP Error 403.0 - ModSecurity Action
Kindly suggest some solution
also the same is working fine in local problem occurs when i upload my webpage to server
I know this is an old thread, but posting the answer so that it can be helpful for others. ModSecurity is an open source, cross-platform web application firewall (WAF) module.
https://modsecurity.org/about.html
So whenever you see the 403 (ModSecurity Action), this means that the mod security firewall has blocked the request. The probable cause could be vulnerable data present in the posted data, or the it could be because of the URL posted as parameter or it could be JavaScript.
In above case, the ModSecurity might have deemed the input as SQL Injection attack and hence may have blocked it. If you look into the logs of the firewall it may give you the detailed explanation.
In my case, I was passing URL as query parameter in the request hence it was returning 403.

How to handle the push data

I dont understand the explanation on the website.
https://developer.foursquare.com/overview/realtime
I am working with classic asp, do they refer to a query string or a form when they say parameter.
I received the following error; Your Server returned: 502 Bad Gateway.
Bad gateway means that your script is trying and failing to connect to an external url

internel server error 500

I made a web application that I connect to it from a mobile device
and I used Ajax Request Object but the status of the object returned data is 500
and after search I found that this means Internel Server Error 500
Is there any suggestions what may be the reason ??
thanks
First of all, you should look your server's error log. It will give you informations about the error (depeding the verbose level given in the configuration)
It could be that the data sent and the data type expected do not match.

Resources