Monday, August 20, 2012

NHibernate:Could not execute native bulk manipulation query...

While working on one of the project for fine tuning the NHibernate queries and functional flow I got to know about the error "could not execute native bulk manipulation query:"

To avoid this error one has to remember the following things:
  1. While executing tasks which requires bulk manipulation of data like update, delete, it is suggested to use the HQL instead of SQL.
  2. While using HQL be cautious to use the createQuery of NHibernate session.
  3. Do not forget to use the ExecuteUpdate();
Hope this will save your precious time for coding :)

Friday, August 17, 2012

Unable to automatically step into the server. The remote procedure could not be debugged. This usually indicates that debugging has not been enabled on the server


I was trying to step into a service using the nettcp remote client and trying to debug service functions however I keep on getting the message : "Unable to automatically step into the server. The remote procedure could not be debugged. This usually indicates that debugging has not been enabled on the server...."

Solution: Add the following entry in the service.exe.config and client config file within section:

Restart the service after adding this entry.
 


Wednesday, August 8, 2012

The .Net Framing mode being used is not supported by.....

We did install one service for exporting the document in different file formats. That service was working fine till the time the deployment wasn't messed up the deployment guy. Suddenly the following exception started coming from production:  
Exception Details: System.ServiceModel.ProtocolException: The .Net Framing mode being used is not supported by 'net.tcp://localhost:86/SomeService'. See the server logs for more details.

Solution: If you ever face such situation then it is advisable to please do check the parameter transferMode which shall have the same setting on the client and on the server side, which could be either transferMode="Streamed" or transferMode="Buffered"... and try again with that operation. It shall work.

Monday, August 6, 2012

The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message...

This request operation sent to net.tcp://XXX.XX.XX.XX:YY/Service did not receive a reply within the configured timeout (00:00:10). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client....

There may be times when you might have received this kind of error in production environment. The reason as the problem states is some operation happening at the server side which is taking longer than expected. To solve this issue set the entries as follows (time set shall be in accordance with the specific requirement.)


closeTimeout="00:01:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
transactionFlow="false" transferMode="Streamed" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="10" maxReceivedMessageSize="2147483647">

maxDepth="128" maxStringContentLength="2147483647" maxArrayLength="2147483647"  maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"
/>

Happy Coding!!!