SqlRemoteBlob.Write fails.

Aug 22, 2011 at 4:47 PM

I'm at a loss here.  I can't figure out what I'm doing wrong.

I am implementing a simple provider following the samples.  I've implemented a CreatePool method which creates a folder and returns a GUID as an ID.  When I use the sample code for testing a provider, I get this error:

"The server configuration information has been updated. SqlRemoteBlobContext object is not valid. Recreate the SqlRemoteBlobContext to fix this error."

Obviously I can't recreate the SqlRemoteBlobContext because Write fails.

The code I'm using which raises this error is substantially:

 using (SqlConnection conn = new SqlConnection(connectionString))
            {
                conn.Open();

                // Create a blob context to operate againt RBS.
                //
                SqlRemoteBlobContext blobContext = new SqlRemoteBlobContext(conn);

                using (SqlRemoteBlob blob = blobContext.CreateNewBlob())
                {
                    // Store new blob data.
                    //
                    byte[] blobData = Encoding.Unicode.GetBytes("Remote Blob Storage Sample Application Store Simple Test Data");
                    blob.Write(blobData, 0, blobData.Length);

The one slight difference in my code is that I am calling CreateNewBlob by passing in a ConfigItemList which specifies a collection (0) and a blob store by name and I don't have a default blob store set on my database.

I'm not even sure where to start.  What's going on?

Coordinator
Aug 24, 2011 at 1:19 AM

Hi Evan,

There are more than one scenarios where this error may occur. Will it be possible for you to post the complete exception stack (if any) for this error. This will help us debug further.

Thanks,

Vijendra.