Archived Forum Post

Index of archived forum posts


Getting Illegal character in file name

Mar 07 '13 at 13:16

When I am reading attachment file name using string attachementFileName = mail.GetAttachmentFilename(0); I am getting Illegal character in file name error message on server and file is not getting saved. But if I receive the same file second time than it is working fine and i am able to save file. Example.. Attached File Name: PlanTO AMSTERDAM v_2.0.xls Is read as : Plan TO AMSTERDAM v_2.0.xls

Attached File Name: Plan_v2 0(deviation pointTO freeport).xls Is read as : Plan_v2 0(deviation point TO freeport).xls

This is not reproducible at local machine. Can anyone please suggest me solution for this?