C# IO Exception -
im trying save file download mailbox. hasnt been problems, i'v built gui upon modell , authorization exception:
saved file: c:\tempnorlander system.unauthorizedaccessexception: access path 'c:\tempnorlander' denied. @ system.io.__error.winioerror(int32 errorcode, string maybefullpath) @ system.io.filestream.init(string path, filemode mode, fileaccess access, int32 rights, boolean userights, fileshare share, int32 buffersize, fileoptions options, security_attributes secattrs, string msgpath, boolean bfromproxy) @ system.io.filestream..ctor(string path, filemode mode, fileaccess access, fileshare share, int32 buffersize, fileoptions options, string msgpath, boolean bfromproxy) @ system.io.filestream..ctor(string path, filemode mode) @ a.a0.b(string a_0, byte[] a_1, int32 a_2, int32 a_3) @ mailbee.mime.attachment.save(string filename, boolean overwrite) @ mail2db.connect2exchange.collectdata() in c:\users\marthin\documents\visual studio 2010\projects\mail2db\mail2db\connect2exchange.cs:line 210
i cant figure out problem here. in folder iv set possible users have priviliges.
edit:
i forgot mention gui enter folderpath in simple textbox. (via folderbrowserdialog)
second edit:
im runnig on windows 7 , vs 2010. thx help! /marthin
saved file: c:\tempnorlander
you trying save file has same name folder. that's not allowed, unauthorizedaccessexception result. fix file name to, say, c:\tempnorlander\mumble.txt
Comments
Post a Comment