WCF, big files, byte[]

Thread is closed for posting
2 posts, 1 answers
  1. Anton Sharov
    Anton Sharov avatar
    5 posts
    Member since:
    Mar 2010

    Posted 28 Apr 2010 Link to this post

    Hello everybody!

    I have a wcf service which receives and stores huge files (~1GB) in DB. OpenAccess mapped varbinary(max) to byte[], so I need to convert streamed data to byte[] (I use code like that ) and I get OutOfMemoryException. I want to ask if there are best practices to save huge files to DB with OpenAccess.

    Thanks in advance,
  2. Answer
    Jan Blessenohl
    Jan Blessenohl avatar
    707 posts

    Posted 29 Apr 2010 Link to this post

    Hi Anton Sharov,
    There is no way to efficiently tunnel the stream operations through OpenAccess, we are working on an API that gives out the ado connection, but it is still some months away.

    The best way is to have your own ado connection, store the clobs in a second table and store only the id in your Persistent object. If you need a transaction around both operations you have to use System.Transactions.

    Jan Blessenohl
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top