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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:10:41+00:00 2026-06-14T09:10:41+00:00

I am developing an app that should be portable and I am using mongodb.

  • 0

I am developing an app that should be portable and I am using mongodb.

By portable I means that my app has a folder with all: dlls, exes, mongo files, mongo databases. Then with this folder I can run my app in any machine.

Then I need to know:

  • Is there some library that allow me to run the mongod process when the app start and end
    the process when the app ends ?

  • Exists a good practice to do that stuff ?

Advices are welcome and 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-14T09:10:42+00:00Added an answer on June 14, 2026 at 9:10 am

    According to the MongoDb installation instructions it should be quite simple.

    Mongodb starts as a console application waiting for connections, so when your app starts, you should run mongodb hidden. We are always assuming that ALL the mongodb files are in place with your application files and database files are in the correct directory).

    When your app terminates, you should kill the process.

    Yo should set the correct paths on this example:

    //starting the mongod server (when app starts)
    ProcessStartInfo start = new ProcessStartInfo();     
    start.FileName = dir + @"\mongod.exe";
    start.WindowStyle = ProcessWindowStyle.Hidden;
    
    start.Arguments = "--dbpath d:\test\mongodb\data";
    
    Process mongod = Process.Start(start);
    
    //stopping the mongod server (when app is closing)
    mongod.Kill();
    

    You can see more information about the mongod configuration and running here

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

Sidebar

Related Questions

I am developing an app that has java files and php files. The java
I'm developing an app that has a model using race results / times etc..
I'm developing application for android by using flex. That app should read sms from
I am developing a small web app that should receive emails from users, using
I am developing an iPhone-App that should run not only on new iphones, but
i'm developing an app that has a jtable and user could start a download.
I'm developing an app that periodically fetches data from server. Now I'm using a
I'm developing an app that should allow the client to add several content sections
A new question about android and services. Currently I'm developing a App that should
I developing an app that is read-only. The data has relationships, so I cannot

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.