Is there a class to wrap blob storage to map to a dirver or net share?
-
30 April 2012 2:24
A lot of existing dll support loading from file system, like
MailMessage mm=new MailMessage();
mm.Load("c:\\test.eml");
just an example, if I port that to Azure, I have a test.eml under one containder, it will be handy if I can map the test.eml to something like \\dummy\test.eml, and call the class to load it. Is it possible?
Semua Balasan
-
30 April 2012 6:37Moderator
Hi,
Do you want to use tranditional IO class and methods in Windows Azure Platform? I'd like to suggest you use Drive as the storage, Azure Drive is used to provide a NTFS formatted VHD file (Page Blob) that you can use file system class to handle the target files with tranditional methods, such as Load(string path) method. Refer to following link for more details and sample code of Drive:
Hope this helps.
Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework
-
30 April 2012 17:28I only want to use traditional IO when I have to, for example, I have a class to read out and parse a PDF on disk, now the PDF is in my Azure, so I need a way to still use the class. I think the most straight way is mapping it to a virtual disk or a network share. Seems quite simple, just I don't know how to write the code.
-
01 Mei 2012 2:20Moderator
Hi,
I am not sure MailMessage.Load() method is your custom method? (or 3rd-party class library), .NET Framework does not include this method (http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.aspx). If so, does it include other overload methods (with other type parameters). As you want to use Blob Storage, you have to change your code with Blob style API, you cannot simply use traditional IO API because they are not the same architecture.
The workaround i can figure out is that if you have a MainMessage.load(Stream stream) override method, you can download the blob from Blob API and convert files as the stream parameter of Load method.
Hope this helps.
Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework
- Ditandai sebagai Jawaban oleh Arwind - MSFTModerator 07 Mei 2012 3:56