0
Fixed

System.NotSupportedException: Cannot write to a BufferedStream

Carol Wapshere 8 years ago updated by anonymous 8 years ago 3

I wanted to try out browsing an IdB 5.1 adapter through LDAP. I can connect to port 389 with both ADSIEdit and Softerra, and I can see a list of available containers. In ADSIEdit I also managed to see a list of object DNs in one of the containers, but couldn't get any of their properties. Softerra won't even show me the list of objects - it just sits there with a wait symbol on getting the selected container. (MA imports into MIM do work however.)


In the IdB logs I see this error:

An error occurred on client from 127.0.0.1:52790. More details:Internal Server Error #11: System.NotSupportedException: Cannot write to a BufferedStream while the read buffer is not empty if the underlying stream is not seekable. Ensure that the stream underlying this BufferedStream can seek or avoid interleaving read and write operations on this BufferedStream.
at System.IO.BufferedStream.ClearReadBufferBeforeWrite()
at System.IO.BufferedStream.Write(Byte[] array, Int32 offset, Int32 count)
at Unify.Product.IdentityBroker.LDAPConnection.PostResponse(IRfcLdapMessage message, Boolean forceFlush)
at Unify.Product.IdentityBroker.RequestHandlerAuditingDecorator.<>c__DisplayClass7_1.<HandleRequest>b__0(IRfcLdapMessage response)
at Unify.Product.IdentityBroker.SearchRequestHandlerBase.HandleRequest(IRfcLdapMessage message, CancellationToken token, Action`1 postAction)
at Unify.Product.IdentityBroker.RequestHandlerAuditingDecorator.HandleRequest(IRfcLdapMessage message, CancellationToken token, Action`1 postAction)
at Unify.Product.IdentityBroker.LDAPRequestHandlerSecurityDecorator.HandleRequest(IRfcLdapMessage message, CancellationToken token, Action`1 postAction)
at Unify.Product.IdentityBroker.LDAPConnection.<RespondToMessageAsync>d__35.MoveNext()

Answer

Answer
Fixed

This issue has been fixed in Identity Broker v5.1 RC2.

Hi Carol,


Thanks for raising this. There were some changes made between v5.0 and v5.1 which added buffering to the network streams used on the LDAP endpoint. It seems that there are some circumstances where the buffer isn't flushed correctly. I've created a backlog item to address this for the next release.

Answer
Fixed

This issue has been fixed in Identity Broker v5.1 RC2.