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

The Archive Base Latest Questions

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

I am taken over support on a VB.Net WinForms application and the company that

  • 0

I am taken over support on a VB.Net WinForms application and the company that I am doing the support for has lost the source code for the application. I have the installation CD for the application and the installation steps for a network install are:

  1. Copy the access database for the application to a location on the server.
  2. Create a share on the folder that contains the database and give Everyone full access.
  3. Install the application on the client desktops via a ClickOnce installation.
  4. The first time the application runs it requests the location of the database. If the database is found in the specified location, then the database path is saved in the registry and used for the database connections.

From a decompile of the application assembly I am able to determine that the following code is being used for establishing the database connections (I would have preferred that the connection string were in the application settings, but no such luck, unfortunately).

OleDbConnectionStringBuilder builder = new OleDbConnectionStringBuilder();
builder.ConnectionString = "Data Source=" + sDatasource;
builder.Add("Provider", "Microsoft.Jet.Oledb.4.0");
builder.Add("Jet OLEDB:Database Password", "....");
builder.PersistSecurityInfo = true;
gconn = new OleDbConnection(builder.ConnectionString);

Now the problem I am having is the following: this application is being used at college and step 2 in the setup is causing a security problem for the college, as opening the folder to this extent allows anyone to copy and execute code on the server. And the college has experienced students finding and exploiting such security issues. Is there some way that access can be restricted to the folder containing the database so that students can’t copy and execute code on the server, but so that the application is still able to connect to and use the access database? Bear in mind that I don’t have the source code at this stage to change the connection string being used for the connections.

UPDATE:

Someone I know has suggested that I use Runas in a batch file to run application with a particular user in the domain and then give only that user rights to the folder with the access database. Would this be a feasible solution?

  • 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-25T14:12:35+00:00Added an answer on May 25, 2026 at 2:12 pm

    In case anyone is interested, I will outline here is how I managed to get this application working without any changes to the source (considering that I don’t yet have a working source!) and yet have the database folder secured for all the users.

    1. I created a user on the server which would be the user that would have full rights to the database folder. I created the same user on my client machine with exactly the same password as on the server, but this is only because I do not have a domain controller setup.
    2. I changed the ClickOnce installation and changed it into a MSI installation and installed the application to Program Files on the server.
    3. I then shared this folder (which also included the Access database) and gave read rights to everyone, but full rights to the user that I created in the first step.
    4. Then I created a wrapper application in .Net that launched the main application with the credentials of the user that has full rights to the application folder. My wrapper application reads the user and password details from an encrypted file stored on the server. I obfuscated the launcher application to hide the decryption algorithm for reading the username and password.
    5. Lastly, I created a shortcut to the launcher application on every workstation.

    Well, that is how I solved it and it works well… almost 100%!! 😉 The only minor (and very weird) hiccup that I have is this… after a reboot of a client machine, launching the application within the first 4 minutes of startup will result in an access denied message when the application running with the specified user tries to write to the registry. If the application is started after 4 minutes into the boot (yes, i timed it!!), then suddenly writing to the registry works flawlessly. Very weird problem indeed, and one that maybe I will put in a separate question on stackoverflow… maybe someone here knows the reason for this strange anomaly at startup.

    Anyway. Thanks everyone for your thoughts and ideas, they helped a lot in getting me to a solution.

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

Sidebar

Related Questions

I have taken over support of a VB.Net WinForms application. I am actually a
We have taken over some .NET 1.1 Windows Service code that spawns threads to
I have taken over support of an application at the company I work for.
I have taken over support of a web application and it includes a SOAP
I have taken over a large code base and would like to get an
i have taken over a database that stores fitness information and we were having
I have taken over some code from a previous developer and have come across
I'm working with a bit of html and Javascript code that I've taken over
I've taken over a mixed PHP4/PHP5 project which has been handed down from developer
I installed Resharper in VS2008 and it seems to have taken over some of

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.