Through research i cant seem to find the best approach, I am making a WPF application and want all users to connect to my database server.
However I don't wish to have the connection details (IP Address, database password) stored on the application. i am currently playing around with PHP as the bridge between.
I have a database server on a domain. I am connecting through HttpClient
and getting a response via a JSON file. However i am concerned as the file can be accessed from anywhere. for example my url is www.domian.co.uk/scores.php
. to increase security i have add a parameter in the StringContent
which will only work if this is set. Could i also use .htaccess
to prevent the file being seen or would this have an effect on my HttpClient
.
var httpClient = new HttpClient();
response = await httpClient.PostAsync(uri, new StringContent(data));
option 2
An alternative i have been looking into but have test due to pricing is Windows Azure. I believe this would be a good alternative as alot of the backend work has been done for me. From this article, you can get the Connection String for your azure service and use System.Data.SqlClient
to make database queries. However the Connection string still requires your password to be included, is this secure including the password or do i need to create a separate DB user with strict permissions?
option 3 From research another option would be to use WCF.