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 7664169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:14:12+00:00 2026-05-31T14:14:12+00:00

I am having a lot of trouble in working with streams using monodroid. What

  • 0

I am having a lot of trouble in working with streams using monodroid. What I am trying to do is simply download a file using a URL and saving it to my phone’s /sdcard location but am having problems. I am getting Access to the path ‘/mnt/sdcard’ is denied.

Code :-

Filestream strlocal;
var fileName = Android.OS.Environment.ExternalStorageDirectory;
string path = Convert.ToString(fileName);
strLocal = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Write);
  • When I debug the app and try to run it on my device, the debugging error points at this line of code.

In Visual Studio, I have made the manifest file using the dialog in properties in which I have given permission to write, i.e :-

uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE

Also , i Tried another approach to write this permission in the main activity page, i.e :-

[Activity(Label = "MonoAndroidApplication2", MainLauncher = true, 
Permission = "android.permission.WRITE_EXTERNAL_STORAGE")

But still getting the same error of denial. Also when I make the manifest file in visual studio, I get strange messages like:-

Message 5   Could not find schema information for the element 'uses-permission'.    

Message 1   Could not find schema information for the element 'manifest'.

Message 2   Could not find schema information for the attribute 'package'.

What do these messages mean?. Please help me in this problem.

I am using the latest version of Monodroid (Bought it a week ago)

  • 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-31T14:14:13+00:00Added an answer on May 31, 2026 at 2:14 pm

    The problem is that you’re trying to open the FileStream using the folder’s path, rather than specifying a file name within that folder. For example:

    string path = Path.Combine(Android.OS.Environment.ExternalStorageDirectory.Path, "MyFile.txt");
    
    using (var stream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Write))
    {
        // write stuff
    }
    

    This will create a file named MyFile.txt in the external storage folder.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a lot of trouble getting my compiled assembly file working on SPIM.
I'm having a lot of trouble trying to compile a resource file (file name
I'm having a lot of trouble trying to define a mock for a rails
I've been having a lot of trouble figuring this out. So I'm using inline
Working with the Facebook php SDK's, I am having a lot of trouble figuring
I am having a lot of trouble trying to find out how to draw
I'm having trouble getting Jackson mixins working for embedded types when using @ResponseBody. I'm
I'm having a lot of trouble working out how to use mod_rewrite (via htaccess)
Ok SO recently I've being having a lot of trouble with an application working
I am having a lot of trouble working with the libxml2 library to parse

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.