Error using Entity Framework Core with SQL Server on UWP app

后端 未结 2 1087
暖寄归人
暖寄归人 2020-12-22 03:53

I have a data project (.net standard 2.0) with Entity FrameWork Core 2.0.2 and SQL Server, Sqlite and PostgreSql providers.

I have more three projects for presentati

相关标签:
2条回答
  • 2020-12-22 04:33

    Enabling and starting the SQL Browser service fixed the problem for me. That avoids messing around with IP addresses and TCP ports.

    Integrated security would not work, however, I had to revert to SQL User ID and password.

    0 讨论(0)
  • 2020-12-22 04:58

    I changed the connection string to use TCP/IP

    Before

    Data Source=xpt/SqlServerExpress;Initial Catalog=gestao_eficaz;User ID=sa;Password=somePassword
    

    After

    Data Source=127.0.0.1,1433;Initial Catalog=gestao_eficaz;User ID=sa;Password=somePassword
    

    It is also necessary to enable the TCP / IP connection in the sql server

    https://stackoverflow.com/questions/2388042/connect-to-sql-server-2008-with-tcp-ip

    Now works !!!

    0 讨论(0)
提交回复
热议问题