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

  • Home
  • SEARCH
  • 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 8314103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:42:42+00:00 2026-06-08T20:42:42+00:00

I have an C# app that simply reads an data from the server and

  • 0

I have an C# app that simply reads an data from the server and translates them into a txt file. The codes were originally from VB 2005 or VB 2008 (inherited from my previous colleague who resigned) Thus, i imported all the codes into vb 2010. When i debug, the codes run perfectly fine. Whenever i publish as a exe file or a standalone, I encountered “Access to the path [C:\blah blah blah.txt] is denied". Nothing else is changed, I tried to change folder permissions and set it to owner and maximum rights to the user.

My server is Windows Server 2008 R2

EDIT: im not using IIS as it is not a web server, its just a normal server holding my database.

EDIT 2: i can only get it to run without the error if i "Run as administrator" whereas my user has no admin rights

  • 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-08T20:42:44+00:00Added an answer on June 8, 2026 at 8:42 pm

    The reason being is probably because for one your application is a Click Once application which will require elevation as it runs under the users context, therefore if you do not have the rights to access C:\blah blah and make changes you will also be unable to use your application.

    My Recommendation to you?

    I personally would write the Text File into the Users Documents folder or anything associated with the Users Profile, that way your click once application should never need to be elevated as it right now runs in a managed environment with some serious restrictions.

    Hope this clears things up a little bit.

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

Sidebar

Related Questions

I am making a simple app that reads data in from a file. So
I have a simple catalogue app that lets users download product data from an
I have an small ASP.NET application that reads data from a table and sends
Help me, Stackoverflow! I have a simple .NET 3.5 console app that reads some
I have one simple app that suppose to get information from user and send
I have a C# application that simply parses all of the txt documents within
An Android/Iphone app will be accessing application data from the server. [Django-Python] How can
I have a fairly simple android app, it gets protobuf data from a web
I have a simple app that reads internet resource and displays the information in
We have a simple console app that uses EF 4 to process data; read

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.