This way, you can use the web service only in LAN and if you later - for whatever reason - want to allow access from Internet, install it on a server in the DMZ. no one can access your web service (and your SQL server) from internet. If you install the web service only in the LAN (what you wrote, you want to do), you simply install the web service on a machine in your LAN (so.
Implement a server side API to get and store registration ids from the client app and optionally provide an Admin panel to send push notification from. Normally only your web service can be accessed from the internet and only your web service can access your SQL server (no one can access directly your SQL server from internet). Implement an Android Client app to register with GCM, send the registration id to your push notification server and manage the notifications sent from your server via GCM. So you can rule exactly over the firewall, what can be accessed from the internet. If the web service should be accessed over the Internet it normally is installed in a DMZ:Īpp Internet outer Firewall web service inner Firewall SQL-Server
Years later, your comment is still helpful can use a web service only in a LAN or only from the Internet or both.Ī web service is a peace of middleware that does the link between your app and the SQL server. Then, you have to implement the access to your webservice in your app ( therefore you will find many informations in the Xamarin forums) an asp.net webservice -> search on the internet for informations So have to create a webservice first (out of the "Xamarin-Universe"), where you implement your methods. In your webservice you implement methods that can be called from you your question, the wcf webservice ( 1 ) have to access the SQL-Server ( 2 ) and you have to implement methods in the wcf webservice that can be called from your app (via httpclient in the app).īut, if you don't already have the wcf webservice, I strongly recommend you, you create a Json-webservice instead of a wcf webservice (as this is the furture. Normally you have to create a webservice that accesses the data on a SQL-Server. User128867 read my posting from June 2015.
I'm using visual studio 2017 with Xamarin, proyect is Cross-Platform portable My SQL Server uses SSL for encrypting traffic (forced).
Is this feature going to be supported Thank youI'm trying to setup my SQL database connection in Android app.
I try to do this but i can't add in a System.Data reference to my project. When I check the SQL log, it says that the client doesn't support encryption. String selectQuery = String.Format("SELECT * FROM ) Įnsure that you have enable Internet Permission for your application. String referenceAccountNumber = "0001134919" The code is: string connectionString = Id= Password= Trusted_Connection=true" My code connects to a SQL database located on a server (not localhost) and then searches for an account number to check if it exists. Define connection string and open the connection using SqlConnection(connectionString) Add in a System.Data reference to your projectĢ. To connect to a SQL Server from a Xamarin app (using Visual Studio, so some instructions might change), I followed this process:ġ.