How to keep connection string secured in open source? [closed] - asp.net

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I have an ASP.NET Core 3.1 web API project. My current working environment is Ubuntu. I am using a remote database. Now the problem is:
I have to keep my project in open source repository
I have to use the remotely connected database, so that my team-mate gets access to the APIs in Mobile Environments directly from the deployed site (heroku/azure)
But in such case, I guess this is not standard and most importantly not secured. So, How do I manage to secure the connection string of my remote database secured in an open source repository?

You can use "UserSecretManager" to put the connectionString into "secrets.json" instead of "appsetting.json". The "secrets.json" remains on your local machine and is outside of the git repository folder.

Related

Recording sound and upload using web application [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I am bulding a learning portal for a client and the client has asked for a feature where the user can record and upload sound directly from the browser (or browser plugin) to a custom made forum on the portal. The client envision having a button like [start recording] on the site. I am probably ending up with recommending against this feature but I would like to hear if any of you have done something similar and what you used.
This specific application is built using dotnet core 2.0 and Angular 5 in the frontend.
Using WebRTC could be an option if you can run your site under an SSL cert.
You may want to take a look to this example here.
Here you have another example using the device camera.
You can store the response on a Blob and send it to your server.
It is an initial aproach but I think it could help you take a decision.

How to prevent hacker from downloading SQLite file from the server? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
As you know when if a stranger know the path of your SQLite database file he can easy download it. my question is how to avoid that?
I'm assuming you're accessing the SQLite database server-side. You could configure whatever host you're using (apache, nginx, etc...) to not allow access to the file or you could change the permissions to the file to only allow you to view it (using chmod).

Cosmos DB Emulator on Virtual Machine [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I installed Cosmos DB Emulator on a virtual machine. The default access url is localhost:[Port number].
Is there any way to connect to the emulator from my development machine.
It should be possible. It requires that the emulator is started with network access, you might also need to register the SSL certificates in the client machine.
You can find the details here: https://learn.microsoft.com/en-us/azure/cosmos-db/local-emulator#running-the-emulator-on-a-local-network

Could hackers steal dlls from an Azure Website? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have an Asp.net MVC website that is hosted in Azure Websites. It uses dlls to access databases etc.
Can hackers potentially download those dlls?
No, dll files in the bin folder can't be downloaded. The web server excludes certain file types and folders for download.
A hacker could of course potentially get the files, but he would have to hack into the server and access them as files directly, it can't just be done by downloading them.
Basically: no.
Of course, if you open up the web site permissions, and move DLLs to places they should not be, etc - all bets are off.

MDF file vs A connection [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I did not try before to include .MDF file in App-Data, I usually connect to Sql Server 2005 or 2008 DB. Why I would use the mdf file, and what is the Pros and Cons.
Thanks
The .mdf file in App_Data is usually associated with SQL Server Compact editions. In production you would prefer to use the full blown version of SQL Server. The local database is good enough for development and testing purposes.

Resources