Data Power Connectivity Errors - c#

All
At times, when sending a request to our web service DataPower sends failure alerts wit the below error codes/messages
0x01130006: Failed to establish a backside connection
0x01130011: Failed to process response headers
I am not sure why this is happening, but I would guess the request is too big to process by DataPower, times out, and sends failure messages to the application.
I found a forum suggesting to increase the thread count max on the Websphere servers, but it was never confirmed to be a working [or non working] solution.
I would like to know if someone has successfully resolved this issue with the above mentioned solution, or what other successful solutions are there.
Thanks

Might be that someone trying to reach not excited uri .
The error say faild established backside connection.

There could be several reasons for it namly,
1. You have conflicting routing information in datapower routing table about back end systems. In this case appliance will sometimes able to connect with backend and sometimes not.
2. The backend server is not able to respond in appropriate time [try to increase the 'back side timeout value].
To accuratly debug the issue you need to post the packet trace between datapower and backend systems [along with src and target IPs you are connecting to].
Are you also using load balancer on datapower to connect with backend?
Ajitabh

Related

C# OData The server committed a protocol violation. Section=ResponseStatusLine

I'm accessing Dynamics 365 Business Central OData API in C# application, and when accessing data in my local system is good and when we deployed the application to client server, randomly (50%) they are getting the error "The server committed a protocol violation. Section=ResponseStatusLine".
I have checked the article https://techcommunity.microsoft.com/t5/iis-support-blog/protocol-violation-section-responsestatusline/ba-p/1227792 and applied all the 3 suggestions, but none of them worked.
I'm able to access the client Business Central API integration application in my local system without any issues.
Assuming that this is client Firewall or load balancer issue. But not able to find the solution.
There are many case behind this issue, avoiding the problem rather than actually fixing it. One of the most common cause of this error is the corrupt or missing headers in the request.
Solution:
The server responds with a 100 continue in an incorrect way. Setting expect 100 continue to false and reducing the socket idle time to two seconds
HttpRequestObj.ServicePoint.Expect100Continue = false;
HttpRequestObj.ServicePoint.MaxServicePointIdleTime = 2000;
Ignore corrupted/missing headers. Ref: Link
Stop skype if it is running on the machine.
If a webserver uses UTF-8 that outputs the byte-order-marker (BOM). For example, the default constant Encoding.UTF8 outputs the BOM, and it is easy to forget this. The webpages will work correctly in Firefox and Chrome but HttpWebRequest will bomb. A quick fix is to change the webserver to use the UTF-8 encoding that doesn't output the BOM.
Check the end point of your request server. ex:https or http.

Getting 'Request_Cancelled' in %windir%\System32\LogFiles\HTTPERR from iOS device

We are trying to find out why background requests to a particular endpoint (http or https) is never getting to IIS. The IIS logs show other requests from our device but none from our background requests. They do show in the HTTP.SYS logs though with no error code, just a 'Request_Cancelled'
Under a different environment in test these requests do work as expected. So the only differences seem to be firewall settings or something we haven't found yet.
Having searched for possible causes I have seen information about possible invalid SSL certificates. We current don't use https for where we are experiencing the issue, and in test we have tried both successfully. Another possible cause may have been latency, so we tried adding a 10 second delay to all requests in test and this also worked as expected.
What could other causes of this error be, and preventing a request to IIS?
I think its a bit difficult to find the root cause for Request cancelled.
You could try to capture and analyze http.sys etl log.
How to capture http.sys etl log.
run CMD.EXE with administrator
use cd c:\etl to locate your folder that you want to place etl log
Run logman start httptrace -p Microsoft-Windows-HttpService 0xFFFF -o httptrace.etl -ets
Try to reproduce the problem
Stop the trace with command logman stop httptrace -ets
Then you should see an .etl file displayed there
How to analyze these logs.
1.Download and install MS network monitor:
https://www.microsoft.com/en-us/download/details.aspx?id=4865
2.Open the etl log with network monitor
3.Select Parser Profiles->network monitor parser->Windows on upper right corner
4.Then you should be able all events happened when you access the endpoint from IOS.
Since we can't find much document about how to troubleshooting request_cancelled error. Maybe analyze http.sys etl would be a good beginning
I've just experienced a similar issue with a vendor-supplied application - one of the XHR requests failing with the web server just abandoning the connection. The IIS log records the request as successful (200), but the HTTPERR log reporting it as "Request_Cancelled".
In my case, this was the result of a response limit applied by the vendor in the web.config (specifically: configuration/system.serviceModel/behaviors/serviceBehaviors/behavior/dataContractSerializer#maxItemsInObjectGraph - as soon as the number of objects serialised in a single response exceeded this, the request got cancelled), and removing this limit allowed the application to work correctly.
Whilst this obviously isn't going to be the same for all cases of unexpected 'Request_Cancelled's, it may be worth checking both your web.config as well as your system-wide C:\Windows\System32\inetsrv\config\applicationHost.config for anything that limits the size of the response.

Azure website IE10/11 error SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3, Could not complete the operation due to error 00002ef3

We are experiencing this error in IE10/11 and have spent the last 2 days researching about it and have not been able to find a solution. We are running a asp.net mvc 5 web application utilizing signalR in specific areas hosted on a azure website that is scaled up to 2 instances. We are using the Redis backplane mod to make sure our SignalR talks back to all instances of the application. The error is intermittent and causes the rest of the application to hang. We do not believe this is a SignalR issue because we removed the invocation of SignalR from the page and was still able to get the issue to occur.
We have tried the following
GET request before POST
Setting the charset=utf-8
Our JS libraries are update to date
We need to find a fix for this issue quickly so if anyone has any ideas I would be really greatful.
thanks in advance
One problem when scaling a SignalR application on more instances is that clients connected to a server only receive updates from other clients from the same server. (The messages are not automatically broadcast between all servers).
http://www.asp.net/signalr/overview/performance/scaleout-in-signalr
One solution is to have a backplane that automatically sends the messages between servers, so that any server has any message at any time so it can push updates to their connected interested clients.
There are two implementations that Microsoft explains in the link above, one using Redis Pub/Sub and the other using Azure Service Bus.
With Redis you simply get an instance running (it can be on Linux, Windows or in Azure) and configure each server to push messages and subscribe to messages on the same channel.
I hope it helps your problem (since you said that the problem is intermitent, I can assume that it appears when clients are connected to different instances of your application).
Good luck!
EDIT:
Thanks for updating your question.
Have a look at this SO post:
IE10/11 Ajax XHR error - SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3
And at this post:
http://www.kewlcodes.com/posts/5/SCRIPT7002-XMLHttpRequest-Network-Error-0x2ef3-Could-not-complete-the-operation-due-to-error-00002ef3
Good luck!
I also ran into this issue. In my case, I used IOwinContext.Request.ReadFormAsync() in my server code. I found out that if I send a post request with json content type, ReadFormAsync() hangs.
I solved it by checking if the request's content type is json, and if so, I use a different method to parse the body.

Webservice taking long time to response

I have a client server application. My server is in PHP, Mysql and Apache and client is developed using C# windows Form. I have SOAP WSDL webservice for client server communication.
Recently I found a problem, when my client sends the request, response comes after very long time (like 3/4 mins to some hrs.), and sometimes I never gets response. I have checked all the timeout value in client (httpwebrequest timeout, readwritetimeout) as well as server(timeout, keepalivetimeout) side, the max value I have is 5mins (for httpwebrequest readwritetimeout). So can anybody tell what would be the problem? Why it is taking hours to get response or not geting any response?
In my experience, problems like these come with the web-service connection being blocked by a firewall, or a wonky proxy in the way. Check that this is not the issue.
You should first begin be locating the problem by narrowing down the options. Have you tried calling the web service on the server locally, see if you get the same problem - if you don't then it is with high likeliness certainly a connection problem.
To also rule out the client having problems, try using something like http://www.soapui.org/ instead to call your server web service.
Where are you calling the server from? Are you sure the device you call it from is not being IP-blocked, and are you sure your web service is able to access its database from where it is being run.
Does the MySQL user defined for your server API to use have access from the IP of the server. MySQL users are often blocked by IP as well.
If you're running it all locally, are you sure your IIS Express settings/virtual folders are not jumbled up and the URLs are resolving wrong. Try creating the virtual folder again to rule out this. Even when running locally, remember to check that the MySQL user has access from your local IP.
Here's a few things I usually check when I have issues like yours.

WPF HTTPWebRequest The underlying connection was closed: An unexpected error occurred on a receive

Firstly, there are a number of other similar questions and I have read them all and they have a similar problem however they differ from my problem:
In a WPF client application I am making several HttpWebRequests to various websites. On one particular machine and for one particular website I receive the following error, however only intermittently, approximately once every 4 or 5 requests:
System.Net.WebException
The underlying connection was closed: An unexpected error occurred on a receive.
at System.Net.HttpWebRequest.GetResponse()
and the status on the Request is ReceiveFailure.
Here's what I've tried:
Changing the timeout to be very high, turning off keep alive and using http 1.0 instead of 1.1, all of which don't change the problem
Running through a proxy to see what was going on but for some strange reason this problem doesn't happen when I run the exact same code through a proxy (by setting the proxy object on the http web request)
I can access the site no problem with IE and chrome
Tried another machine inside on my home network and had no problems. Similarly with another machine outside of the network.
This problem happened after upgrading this machine to Win7 however after going back to WinXP the problem is still ocurring.
Any help is greatly appreciated, all of the other posts either were for people talking to their own webservices and it was an ASP configuration problem or something like that. The site I am making requests too is an ASP site but I don't believe its a problem with the 3rd party site as this exact same code works on other machines just not one particular one.
A ReceiveFailure status means that your application started receiving the response but it was closed before the complete message was received for some reason.
Since you've already changed the timeout etc with no success the problem might be the server is closing the response stream prior to a complete response for some reason. Isolated to a specific machine might indicate a possible hardware issue or configuration on that particular machine. The fact that it's only for one website on the machine indicates configuration rather than hardware. Is there something different on that machine? Updates? IIS configuration?
It might be working through IE, Chrome and the Proxy because those would have some error handling already built in (IE and Chrome would definitely have error handling and retry the requests, I assume the proxy would too). You may have to build some of this error handling into your code.

Categories