FileAttachment.Load() get's stuck

Hi

I'm developing a console application in C# to download email attachments, so i fetch the emails and download the attachment and it works fine, but when I change the project properties from console application to windows application the FileAttachement.Load() function get's stuck 

EmailMessage email = EmailMessage.Bind(service,it.Id, new PropertySet(ItemSchema.Attachments));
Attachment att = email.Attachments[0];
FileAttachment fileAtt = att as FileAttachment;
FileStream file = new FileStream("FilePath",FileMode.OpenOrCreate, FileAccess.ReadWrite);
fileAtt.Load(file);
file.Close();
file.Dispose();

Regards, 

Daniel V


September 10th, 2015 7:40pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics