Wednesday, 23 October 2013

Microsoft.ServiceModel.Channels.Common.ConnectionException: Connection request timed out

Recently I have added two more Oracle Polling ReceiveLocations to poll the data form same Oracle Server. Its was going smooth but I have seen the Production event logs fill with below warning message. 
This is quite simple to fix it . You need to add TransactionTimeout period and transaction isolation level.

Transaction isolation level = Serializable

TransactionTimeout = same as your receive timeout period.

The adapter "WCF-OracleDB" raised an error message. Details "Microsoft.ServiceModel.Channels.Common.ConnectionException: Connection request timed out ---> Oracle.DataAccess.Client.OracleException: Connection request timed out

at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)

at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
at Oracle.DataAccess.Client.OracleConnection.Open()
at Microsoft.Adapters.OracleDB.OracleDBConnection.OpenConnection(OracleCommonExecutionHelper executionHelper)
--- End of inner exception stack trace ---
at Microsoft.ServiceModel.Channels.Common.Channels.AdapterInputChannel.EndTryReceive(IAsyncResult result, Message& message)
at System.ServiceModel.Dispatcher.InputChannelBinder.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult result, RequestContext& requestContext)".

The below link would help you for how to add

Drop a comment if this article helped you to solve your problem. you can reach me @

xmlReader.Read() skipping nodes xmlReader.ReadOuterXml()

XMLReader.Read() is strange behaviour when I try to parse XML using the XmlReader object. It usually skips the record and move the pointer to next level of element while loop through the elements. The code which I used to find each child records.

This is the sample xml file.

The code which I used to find each child records as detailed below.

When you call ReadOuterXml() method this would consume the complete xml  and point the cursor to just before the next element.

In my example the cursor will pint to element of Order ID=2 record. Hence it never satisfies the condition to fetch Record 2.

Here is the alternate way to find the child records.

You can reach me @