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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:38:36+00:00 2026-06-10T11:38:36+00:00

Alright so I’ve decided to create my first GUI Address book and I’ve been

  • 0

Alright so I’ve decided to create my first GUI Address book and I’ve been following a tutorial on Youtube that allows us to create an Address Book that is suppose to store the information entered into the text boxes as an xml but I’ve been having trouble.

So when the form loads, it’s suppose to check for a folder named “Address Book” and if it’s not there, create it. Then check if a document is in there, if not, it creates it. But for some reason the folder does not get created, even though it doesn’t exist, same with the xml file.

private void Form1_Load(object sender, EventArgs e)
{
    string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
    if(!Directory.Exists(path + "\\Address Book"))
        Directory.CreateDirectory(path + "\\Address Book");
    if (!File.Exists(path + "\\Address Book\\settings.xml"))
        {
            XmlTextWriter xW = new XmlTextWriter(path + "\\Address Book\\settings.xml", Encoding.UTF8);
            xW.WriteStartElement("People");
            xW.WriteEndElement();
            xW.Close();
        }

Can anyone point out my mistake? The original path was SpecialFolder.ApplicationData but I wanted to use desktop because looking for the folder would be a click away.

  • 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-06-10T11:38:38+00:00Added an answer on June 10, 2026 at 11:38 am

    The sounds pretty much like Read/Write permission access issue.

    Do not use Desktop like file/directory write destination, but use folders where your OS User, so the application too, is guranteed to have relative permissions. So those folders which you saw in tutorial. Especially latest WinOS es are very rigid on this kind of stuff.

    If it frustraits you, to navigate to those folders every time, create a link to that folder on your Desktop. Fast and easy.

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

Sidebar

Related Questions

Alright, so I've been trying to implement a simple binary search tree that uses
Alright, I have been doing the following (variable names have been changed): FileInputStream fis
Alright let me explain my situation first: I am part of an organization that
Alright so i need to open a .txt file that will be created in
Alright I created some custom classes for my project sourced from this tutorial ,
Alright so I have been looking around (on SO and Google) to see if
Alright so this is a bizarre cross platform thing that I'm experiencing with text
Alright y'all. I am attempting to write a bit of code that places typographic
Alright, so I'm new to Android programming, so far my experience has been quite
Alright. This may be difficult but I have been struggling for quite a bit

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.