Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. How to secure local database for windows form c# Deploy

How to secure local database for windows form c# Deploy

Scheduled Pinned Locked Moved Windows Forms
3 Posts 3 Posters 11 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    salar1369
    wrote on last edited by
    #1

    Hello, i have finished developing a c# code for a software, and it is time to make a installation setup for it ( using "Setup and Deployment" project of visual studio ) and then give this installation setup to the users to install and use the software. this software uses files of DLLs, database files (mdf,ldf) and some other (.exe, .exe.config, .exe.manifest and .pdb) ( Please See the picture of files for setup and deployment ) ... in the setup project of this software i need to put the required files to be installed on users pc... so i put all the files in release folder including database files mdf and ldf)... the problem is that anyone who has installed this application, can see my MDF and LDF database files and can easily attach it to a sql server and find out how my tables were designed and what are my records. Please help me with these questions that i need the most : 1)how could i prevent users from seeing these source files? 2)is this way of publishing (put every thing in release folder for installation of end user) correct? 3)should i directly put MDF and LDF files or have to do a some work of securing them like compiling into irreversible format that only application can use it not anyone else? 4)should i do something in the process of creation of database in visual studio to prevent any one accessing it except software itself? 5)am i missing a concept in the way of publishing an application with local database? P.S: application is developed by C# windows form using visual studio .net 2013 (.NET 4.5) Setup project is used by "Setup and Deployment" of visual studio Application is using local database by visual studio (Visual C# items - Serviced base database) This is my first time of publishing an actual software sorry for any lack of information

    L E 2 Replies Last reply
    0
    • S salar1369

      Hello, i have finished developing a c# code for a software, and it is time to make a installation setup for it ( using "Setup and Deployment" project of visual studio ) and then give this installation setup to the users to install and use the software. this software uses files of DLLs, database files (mdf,ldf) and some other (.exe, .exe.config, .exe.manifest and .pdb) ( Please See the picture of files for setup and deployment ) ... in the setup project of this software i need to put the required files to be installed on users pc... so i put all the files in release folder including database files mdf and ldf)... the problem is that anyone who has installed this application, can see my MDF and LDF database files and can easily attach it to a sql server and find out how my tables were designed and what are my records. Please help me with these questions that i need the most : 1)how could i prevent users from seeing these source files? 2)is this way of publishing (put every thing in release folder for installation of end user) correct? 3)should i directly put MDF and LDF files or have to do a some work of securing them like compiling into irreversible format that only application can use it not anyone else? 4)should i do something in the process of creation of database in visual studio to prevent any one accessing it except software itself? 5)am i missing a concept in the way of publishing an application with local database? P.S: application is developed by C# windows form using visual studio .net 2013 (.NET 4.5) Setup project is used by "Setup and Deployment" of visual studio Application is using local database by visual studio (Visual C# items - Serviced base database) This is my first time of publishing an actual software sorry for any lack of information

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      salar1369 wrote:

      1)how could i prevent users from seeing these source files?

      You can't; you can spend money on making it harder to read, but it will still be a list of computer-instructions that can be read by both CPU and user.

      salar1369 wrote:

      2)is this way of publishing (put every thing in release folder for installation of end user) correct?

      No; applications should be installed in the program files folder (that's where applications go) and data in the users documents folder.

      salar1369 wrote:

      3)should i directly put MDF and LDF files or have to do a some work of securing them like compiling into irreversible format that only application can use it not anyone else?

      If it is irreversable, how would you read it?

      salar1369 wrote:

      5)am i missing a concept in the way of publishing an application with local database?

      Yes; ownership. If the database is local on my system, you cannot lock me out - I'm the owner of my machine and its data. If you want to make sure that people don't get into your database, then the only option is to "not" use a local database, but host one.

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

      1 Reply Last reply
      0
      • S salar1369

        Hello, i have finished developing a c# code for a software, and it is time to make a installation setup for it ( using "Setup and Deployment" project of visual studio ) and then give this installation setup to the users to install and use the software. this software uses files of DLLs, database files (mdf,ldf) and some other (.exe, .exe.config, .exe.manifest and .pdb) ( Please See the picture of files for setup and deployment ) ... in the setup project of this software i need to put the required files to be installed on users pc... so i put all the files in release folder including database files mdf and ldf)... the problem is that anyone who has installed this application, can see my MDF and LDF database files and can easily attach it to a sql server and find out how my tables were designed and what are my records. Please help me with these questions that i need the most : 1)how could i prevent users from seeing these source files? 2)is this way of publishing (put every thing in release folder for installation of end user) correct? 3)should i directly put MDF and LDF files or have to do a some work of securing them like compiling into irreversible format that only application can use it not anyone else? 4)should i do something in the process of creation of database in visual studio to prevent any one accessing it except software itself? 5)am i missing a concept in the way of publishing an application with local database? P.S: application is developed by C# windows form using visual studio .net 2013 (.NET 4.5) Setup project is used by "Setup and Deployment" of visual studio Application is using local database by visual studio (Visual C# items - Serviced base database) This is my first time of publishing an actual software sorry for any lack of information

        E Offline
        E Offline
        Eric P Schneider
        wrote on last edited by
        #3

        You could encrypt the data in the database. Or switch to a host database Sql Azure.

        Schneider

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups