S
S
Sasha Pleshakov2016-07-11 15:35:28
C++ / C#
Sasha Pleshakov, 2016-07-11 15:35:28

How to connect to database in azure?

public class MusicContext : DbContext
        {
            public DbSet<Album> Albums { get; set; }
            public MusicContext(): base("MyDB"){}
        }

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
        <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    </configSections>
  <connectionStrings>
    <add name="MyDB" providerName="System.Data.SqlClient" connectionString="Server=tcp:pleshakov.database.windows.net,1433;Data Source=pleshakov.database.windows.net;Initial Catalog=MyDB;Persist Security Info=False;User ID=;Password=;MultipleActiveResultSets=False;Encrypt=True;Trusted_Connection=false;Encrypt=false;TrustServerCertificate=False;Connection Timeout=30;"/>
  </connectionStrings>
</configuration>

If you try to add something to the database, then there will be an exception "SSL encryption for data sent between client and server is not implemented."
I write in Xamarin, Mono 4.4.1, OS: OS X. Suddenly something depends on this.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
#
#algooptimize #bottize, 2016-07-11
@mnepoh

Once a poppy, then read below
stackoverflow.com/questions/30506990/connecting-to...

T
Tsiren Naimanov, 2016-07-11
@ImmortalCAT

Realm
new database for xamarin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question