Quantcast
Channel: Silverlight 5 forum
Viewing all articles
Browse latest Browse all 1083

Silverlight FileUpload throws System.UnauthorizedAccessException: [UnauthorizedAccess_IODenied_Path]

$
0
0

Below is my code

FileUpload _fu = new FileUpload();
            _fu.FileAttribute = _SelectedFiles[i];
            _fu.FileName = _SelectedFiles[i].Name;
            _fu.FileSize = fileSizeString(_SelectedFiles[i].Length);
            _fu.CompletedFileSize = "0%";
            if (_lstQueuedFiles.Where(Item => Item.FileName == _fu.FileName).Count() == 0)
            {
                _lstQueuedFiles.Add(_fu);
            }
            else
            {
                MessageBox.Show(_fu.FileName + " - already exists!");
            }
            try
            {
                var temp = _fu.FileAttribute.OpenRead();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }

and i'm getting this exception as follows:

System.UnauthorizedAccessException: [UnauthorizedAccess_IODenied_Path] Arguments: Install Microsoft® Silverlight™ Browser Plug-In.pdf Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.1.20913.00&File=mscorlib.dll&Key=UnauthorizedAccess_IODenied_Path 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, Boolean useLongPath, Boolean checkHost) 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, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync) at System.IO.FileInfo.OpenRead() at FileUploader.MultipleFileUploader.ImportFilesToGrid()

It happens only on Mac safari.. how to overcome this issue?

Please comment.

Thanks

shankar.m

Viewing all articles
Browse latest Browse all 1083

Trending Articles