You can't. An .MDF file can only be attached by a single instance of SQL Server Express at a time, or whichever local server you're using.
If you need to "share" that file among multiple instances of your application you need a single SQL Server to host the database. All of your application instances will talk with that single instance of SQL Server. SQL Server Express can be used, but you have to configure it to accept
remote connections[
^].