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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:31:19+00:00 2026-06-18T01:31:19+00:00

I have a C# .NET Framework 4.0 desktop application with Entity Framework as DAL.

  • 0

I have a C# .NET Framework 4.0 desktop application with Entity Framework as DAL.
When a try to save a data into DBContext on anybodies machine but mine, I recieved an exception

Failed to update database "*.mdf" read only

I keep my DB near .exe file, in folder “DAL/AppData”.

How can I allow write access on other machines?
Can I do it programmatically?

I’ve read that I can place DB into AppRoaming Folder, but this is not my variant.

Thanks in advance.

  • 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-18T01:31:21+00:00Added an answer on June 18, 2026 at 1:31 am

    I keep my DB near .exe file, in folder “DAL/AppData”.

    Yes. Can it be you mean that this is in the programs file folder, you know.

    THe one that windows specs of the last 10 years say is “read only” for normal users?

    OUCH.

    THer are folders for storing data. There is a SpecialFolders enumeration to get the valid path of every such folder.

    How can I allow write access on other machines? Can I do it programmatically?

    On a SQL Server, this is done by allowing the other computer to access the server, not the data files. I.e. you connect to the SQL Server on the other machine, which is having the database loaded.

    I’ve read that I can place DB into AppRoaming Folder, but this is not my variant.

    First, that would be stupid unless you do actually plan for roaming – SQL shold go into a local folder, never roaming.

    Second, “not my variant” is like “Hey, I drive the car against the rules, what can I do not to get speeding tickets”. And “following the law is not my variant”. Your variant is something WIndows does not care for. Learn how to install your software according to the windows guideline which is VERY clear where changing data should NOT be.

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

Sidebar

Related Questions

My WPF desktop-based application uses ADO.Net Entity Framework in order to connect to SQL
I have an application that uses the .NET framework 3.5. I am building this
Hi there I am desktop application developer but now i have to work on
I have written a Windows Forms application in C#, .NET framework 2.0, that uses
I have an application written in C#, using .Net 4.0 framework. As the application
I am new to Entity Framework but have spend a lot of time reading
I have an existing VS 2005 Std .NET Compact Framework application that I want
In case I have .NET framework installed in my computer + all the necessary
I am currently working with some users that do not have the .NET Framework
We have an ASP.NET page running on .NET Framework 4.0. At the moment we

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.