Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3273146
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:54:04+00:00 2026-05-17T18:54:04+00:00

Our application requires a user to select a photograph from their camera. The cameras

  • 0

Our application requires a user to select a photograph from their camera. The cameras I tested with while adding this feature would all appear as a drive letter in “My Computer” so loading and working with the image was a no-brainer. A coworker gave me his camera which rather than mount as a drive it triggers the awful “Scanner and Camera Wizard”. I was encouraged to see that in “My Computer” there was an entry for the camera and indeed I was able to browse to and select files from a standard OpenFileDialog. – GREAT!

Except that when I attempt to ACCESS the file I receive “UnauthorizedAccessException”. Upon investigation I see that it’s actually loading the files from this location:
C:\Documents and Settings\sk\Local Settings\Temporary Internet Files\Content.IE5\AXY0DNE3

What in the world?! IE5.5??

From here things keep going downhill. That location is apparently a very well hidden location that I can only navigate to by directly entering the path in the explorer bar. I then figured I could just copy the file to a temp location and work with it from there. So I did that but I still can’t work with the file, throwing the same exception:
Access to the path ‘C:\Documents and Settings\sk\Local Settings\Temp\IMG_0005[1].jpg’ is denied.

It appears that the permission settings were copied along with the file (makes sense).

As a workaround I have instructed my users to use the terrible little wizard, copy the files to a temporary location and then select them fro there. I don’t like this but I needed to get this feature deployed Today. With a workaround in place I would now like to try and get this working if possible. Ideally I could just work with the file without copying it around to other locations, etc. What I don’t understand is why the UnauthorizedAccessException is being throw.

I’m hoping that someone out there has faced a similar challenge and can share some tips on how to work with these files. I’d rather not go the whole WIA route and work with the files via the camera interface.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:54:05+00:00Added an answer on May 17, 2026 at 6:54 pm

    The file is Read Only. I should have checked this!

    Of course there are many ways to handle this. At first I thought “I will just force the read only attribute down” but then I thought “wait, I shouldn’t need to do that, I am after all only READING the file” So long story short that made me look deep into my IO library and find that I wasn’t explicitly setting FileAccess to Read like I should:

    public static byte[] ReadWholeFileBytes(string filename)
    {
        Guard.ArgumentNotNullOrEmptyString(filename, "filename");
    
        if(!File.Exists(filename))
        {
            throw new FileNotFoundException("Failed finding file " + filename);
        }
    
        using (Stream stream = new FileStream(filename, FileMode.Open, FileAccess.Read))
        {
            return ReadWholeStream(stream);
        }
    }
    

    However for the sake of making this answer complete for others you can drop the Read Only with this little bit of code:

    File.SetAttributes(openFile.FileName, FileAttributes.Normal);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our application runs off MySQL, but a client has another application that requires SQL.
Our application is interfacing with a lot of web services these days. We have
Our application is a hybrid Win32 unmanaged application and a .NET 2.0 managed application.
Our application has a file format similar to the OpenDocument file format (see http://en.wikipedia.org/wiki/OpenDocument
Our application is structured something like: UI <--> REST API <--> Workflow <--> Business
Our application takes significantly more time to launch after a reboot (cold start) than
Our application is well structured (well we did our best!) and we have split
Our application is written in C++ and used on Windows XP. On some client
Our application (C#/.NET) needs a lot of queries to search. Google's 50,000 policy per
Our application exposes queries by way of web services, and what we've found is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.