我試圖保存一個文件,我從郵箱下載。這種處理不當出現過什麼問題,但現在我心中已經在我的潛行內置的GUI我得到和授權例外:C#IO異常
Saved file: C:\TempNorlander
System.UnauthorizedAccessException: Access to the path 'C:\TempNorlander' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at 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)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at a.a0.b(String A_0, Byte[] A_1, Int32 A_2, Int32 A_3)
at MailBee.Mime.Attachment.Save(String filename, Boolean overwrite)
at Mail2DB.Connect2Exchange.CollectData() in C:\Users\marthin\documents\visual studio 2010\Projects\Mail2DB\Mail2DB\Connect2Exchange.cs:line 210
我無法弄清楚的問題是在這裏。在文件夾iv中,所有可能的用戶都擁有所有的特權。
編輯:
我忘了提,現在用GUI我在一個簡單的文本框中輸入FOLDERPATH。 (通過的FolderBrowserDialog)
第二個編輯:
進出口運行過程中出現這對Windows 7和2010年VS THX 任何幫助! /Marthin
這是什麼樣的GUI? – BrokenGlass 2011-01-25 20:44:58
它是一個Windows應用程序,用戶在那裏填寫連接信息到交換服務器,並將包含一些和csv文件的郵件下載並解析到數據庫中。 – Marthin 2011-01-25 20:51:22