File Locked after adding it as attachement

No Comments

I was encountering a problem whereby when I was adding an attachement to be sent by email :-

// Create  the file attachment for this e-mail message.

Attachment data = new Attachment(filePath, MediaTypeNames.Application.Octet);

// Add time stamp information for the file.

ContentDisposition disposition = data.ContentDisposition;

disposition.CreationDate = System.IO.File.GetCreationTime(filePath);

disposition.ModificationDate = System.IO.File.GetLastWriteTime(filePath);

disposition.ReadDate = System.IO.File.GetLastAccessTime(filePath);

// Add the file attachment to this e-mail message.

message.Attachments.Add(data);

this same file was being locked and could not be moved to a “processed” folder.  Spent a couple of hours tried to figure out why.  Then I found out what the problem was.

The line of code that did the trick was

message.Dispose();

New website

No Comments

Finally I have decided to re-design my personal portfolio, and decided to give WordPress a go.  And I can say that I am pretty amazed on what this tool can do out of the box, with some playing around.  Basically I wanted to put together my posts as well as all the details about me in one place.  I hope you like my website and feel free to contact me and sign my guestbook.

Blogging Again

No Comments

Well, after almost a year from my one and only posting, I decided to try and start blogging again, whenever I have some free time. I got hooked again on this blogging thing after seeing some very interesting blogs by others written on .NET. So I will try to write some hopefully interesting things that are happening in my life. Hope this will turn into an interesting one.

Cheers for now

J

Malta after 8 months

No Comments

My first day in malta, after 8 months was on the 20th of May. Well what can I say, things have changed! In what way?

First of all, the weather! How can we have a 35C in May???? It felt quite strange after 2 months in cold Dublin, to come back here at this temperature. I went out the first day in the morning, to do some shopping and i was gonna faint.

People. People are feeling more strange to me after all this time. Its like I have been away for 5 years. Maybe I have changed too after 6 months in Sydney and 2 months in Dublin. Life in Malta seems to be more fast now than it was before.

Nightlife. What can I say about the nightlife? Sat night used to be packed in Paceville. Not anymore. Maybe people do not afford to go out that much anymore. Maybe life in Malta has become too expensive. Clubs seemed to be too empty for this time of year.

So yeah, Malta has changed quite a lot for me in the last 8 months. Maybe my life is better in Dublin for me at the moment. Or maybe I am used to the metropolitan life now, and its quite strange for me this type of situation now.

Blog WebMastered by All in One Webmaster.