How do I serialize a .NET object into Azure Blob Storage without using a temporary file? How do I serialize a .NET object into Azure Blob Storage without using a temporary file? azure azure

How do I serialize a .NET object into Azure Blob Storage without using a temporary file?


You could do the following. Create a MemoryStream instance and use XmlSerializer.Serialize(Stream stream) to serialize the object into the memory stream, then "rewind" the stream to beginning using Seek(). Then you call CloudBlob.UploadFromStream() to upload the stream contents to the blob.