30 April 2012 2:24
A lot of existing dll support loading from file system, like
MailMessage mm=new MailMessage();
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?
30 April 2012 6:37Moderator
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.
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
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.
- Ditandai sebagai Jawaban oleh Arwind - MSFTModerator 07 Mei 2012 3:56