Exchange Webservices (EWS) UpdateItems error 503 - exchangewebservices

if i try to update more than one appointment with the Service.UpdateItems methode the server returns an 503 error.
My Code:
service.UpdateItems(appointments,folderID,ConflictResolutionMode.AutoResolve, null, SendInvitationsOrCancellationsMode.SendToNone);
Updating a single appointment with the Appointment.Update methode works.
Has anyone an idea why Service.UpdateItems does not work ?

You may be getting throttled by Exchange by trying to execute too many updates at once. Try smaller batches - of 10 items, or try spacing your requests with longer breaks between them.
As it is described here, there are three response codes which may indicate a throtting problem:
HTTP Status 503 Indicates that EWS requests are queuing with IIS. The client should delay sending additional requests until a later time.
HTTP Status 500 - Indicates an internal server error with the ErrorServerBusy error code. This indicates that the client should delay sending additional requests until a later time. The response may contain a back off hint called BackOffMilliseconds. If present, the value of BackOffMilliseconds should be used as the duration until the client resubmits a request.
HTTP Status 200 - Contains an EWS schema-based error response with an ErrorInternalServerError error code. An inner ErrorServerBusy error code may be present. This indicates that the client should delay sending additional requests until a later time.

Related

API POST response returning 400 response code in Jmeter

I am trying to create a test plan using jmeter.its for an API Post request, I have a header manager, bodydata, checked for spellings and the syntax seems to be correct. However, Im getting 400 response code with the following error shown in the attached image. Anyone with an idea how I can resolve this? Thank you. the error
Here is the request the request
The user doesn't have to be logged in, i have added a header manager, I have also noticed there header has a cookie value thats hard coded but it appears to be the same in every request. In the UI the API request returns 200 and thats what im expecting with the Jmeter script.
In its current form the question cannot be answered comprehensively.
HTTP Status Code 400 means that
The 400 (Bad Request) status code indicates that the server cannot or
will not process the request due to something that is perceived to be
a client error (e.g., malformed request syntax, invalid request
message framing, or deceptive request routing).
Check that your ${site} and ${csVersion} variables have their respective values using Debug Sampler and View Results Tree listener combination
Cross check headers sent by JMeter and by the "UI", the most important is Content-Type
Use a sniffer tool like Wireshark of Fiddler and capture the requests which are being sent by JMeter and the "UI", the requests must be exactly the same apart from dynamic parameters which need to be correlated
The issues was being caused by an anti-forgery cookie which was hard coded in the request.I used a regex to extract the value from a previous request and used a variable value from the regex to make sure the same value is being passed on to the request that was failing.

Jmeter: How to resolve Conflict message 409 in deleting a particular id

I created a container with post Request and now i want to delete the container with container Id parameter.This is the error message i am getting .
could you tell me the reason for this conflict message in Delete HTTP Request
Since this is DELETE request/operation, 409 status code probably means you are not allowed to delete the entity. Check your user permissions and the specific entity requirements.
Most probably you have recorded your script and somewhere in generated HTTP Request samplers there is hard-coded ID of 1216 and when you're trying to replay your test with > 1 user your web application responds with HTTP 409 status code
Alternatively you're trying to update an item with again recorded hard-coded timestamp and your application refuses to do it as it's older than the current time.
So you need to revisit your HTTP Request sampler and either correlate the item ID or parameterize the timestamp using __time() function or both

Logic Apps Do Until Error Http Get Request Parse JSON

In Microsoft Azure Logic Apps, I have a do until loop which loops through a get request until it is completed. But the HTTP Get request is giving the following error to do with timeout. It seems that even with 4 retries within 2 minutes, the http get request times out.
BadRequest. Http request failed: the server did not respond within the
timeout limit. Please see logic app limits at
https://aka.ms/logic-apps-limits-and-config#http-limits.
ActionFailed. An action failed. No dependent actions succeeded.
4 retries occurred.
Until Loop Control elaboration

Azure APIM why am i getting response code of 0

I have an APIM setup which is backed by a logic app which puts a message into a queue.
When I look in Application insights I can see non-successful requests being returned.
All I the detail I can see get in the response code is 0 [not sent in full (see exception telemetries)]
I have a support request open with MS around why I can query the APIM directly (which means I can't see more detail of the exception)
Under what scenarios should I expect to see a status code response of 0.
We made an explicit decision to have non-Http bindings return a 0 status code because they're not really Requests. We've been talking with the App Insights team about another 'Operation'-type of Telemetry that we could use besides Request, but that's still in discussion.
For response code 0, the error code indicates that the response was empty, (as not even headers were returned). This means the connection was accepted and then closed gracefully. There are a number of things which could cause this, adblock, firewall, offline may cause it. A status code of 0 universally means "undefined".
For more details, you could refer to this issue.

Should I respond with a 400 error if a form submit contains validation errors?

In a classic form-based webapp, if a user submits a HTML form that contains validation errors, assuming no JavaScript, what's the correct thing to do?
Respond with the HTTP 200 + the page content (including error info for the user)
Respond with the HTTP 400 + the page content (including error info for the user)
Does it matter?
Your app is talking to human beings, not other machines. Therefore you should do the right thing and handle exceptions in a user-friendly manner.
Your user doesn't care about HTTP return codes, and so it should not even be a consideration for you either. You are confusing business-logic problems with HTTP protocol problems.
Infact, by throwing a 400 error at a web-browser, you are only likely to encounter the web browser throwing up an ugly message to the user.
If you were coding a REST api, then the answer would be different. But you're not.
1) would be the correct approach because you want to display a page of content to the user that highlights the invalid input values.
The trouble with 2) is that some browsers may display their own 'friendly' error page that is designed to help users understand 4xx errors. Here's some information about when IE displays 'friendly' error pages:
http://support.microsoft.com/kb/294807
On the one hand, if it is a web app for human consumption, a 200 with a some useful error message will work. Making web sites for humans is easier in that sense because they can read and understand the content and do not have to depend on the status code for interact with the applications.
On the other hand, If you thinking of a REST API more appropriate would be to throw a 4xx error because it is a client side error. In that case, you have several options.
According RFC2616, a 400 means
The request could not be understood by the server due to malformed
syntax. The client SHOULD NOT repeat the request without
modifications.
This doesn't seem to be appropriate as it's not due to malformed syntax.
However, RFC2616 is now obsoleted by RFC7230-7235. The new RFC7231 defines the meaning of 400 in a more broader way.
Client Error 4xx The 4xx (Client Error) class of status code indicates
that the client seems to have erred. Except when responding to a HEAD
request, the server SHOULD send a representation containing an
explanation of the error situation, and whether it is a temporary or
permanent condition.
400 Bad Request
The 400 (Bad Request) status code indicates that the server cannot or
will not process the request due to something that is perceived to be
a client error (e.g., malformed request syntax, invalid request
message framing, or deceptive request routing)
So this seems acceptable even though still generic. Another option would be to use 422 status code defined by RFC4918 (WebDAV).
422 Unprocessable Entity The 422 (Unprocessable Entity) status code
means the server understands the content type of the request entity
(hence a 415(Unsupported Media Type) status code is inappropriate),
and the syntax of the request entity is correct (thus a 400 (Bad
Request) status code is inappropriate) but was unable to process the
contained instructions. For example, this error condition may occur
if an XML request body contains well-formed (i.e., syntactically
correct), but semantically erroneous, XML instructions.