Query returns no data, even though I can access the DataBase in ASP.NET 4.5
<p>I published an ASP.NET MVC 5 Application under the .NET Framework 4.5. 
The Server is a Windows 2012 R2 dedicated Server. The framework of the database is MS SQL Server 2016. </p>

<p>I changed the connectionString to:</p>

<pre><code>&lt;connectionStrings &gt;
    &lt;add name="ApplicationDbContext"
        connectionString="Server=server.de;Database=DataBase;User ID=UserName;Password=xxxxxxxx;Trusted_Connection=False;"
        providerName="System.Data.SqlClient"/&gt;
&lt;/connectionStrings&gt;
</code></pre>

<p>When I built the project afterwards the server explorer refreshed and I could see the data base. Also I have full access to the database from the server explorer now. 
<strong>But somehow every query in my project returns no data.</strong> 
So, I tried to access the DB from a Controller method: </p>

<pre><code>using (SqlConnection s = new SqlConnection("Data Source=server.de;Initial Catalog=DataBase;Integrated Security=False;User ID=UserName;Password= xxxxxxxx "))
{
    s.Open();
    SqlCommand cmd = s.CreateCommand();
    cmd.CommandText = "SELECT * FROM AspNetUsers;";
    string allUsers = (string)cmd.ExecuteScalar();
}
</code></pre>

<p>To access the DB like this works perfectly. </p>

<p>Why can´t I access the DB by my standard DB-Context? It only works with the SqlConnection within the Code.
Is the ConnectionString right? Did I forget something else?</p>

<p>(I already updated SSTP to 2016 in VS)</p>

<p>This is my DB-Context:</p>

<pre><code>public class ApplicationUser : IdentityUser
{
    public async Task&lt;ClaimsIdentity&gt; GenerateUserIdentityAsync(UserManager&lt;ApplicationUser&gt; manager)
    {

        var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);

        return userIdentity;
    }

    public int? BauunternehmenId { get; set; }

    public virtual Bauunternehmen Bauunternehmen { get; set; }

    public int? BauherrId { get; set; }

    public virtual Bauherr Bauherr { get; set; }


}

public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser&gt;
{
    public ApplicationDbContext()
        : base("DefaultConnection", throwIfV1Schema: false)
    {
    }
    public virtual DbSet&lt;Bauunternehmen&gt; MyBauunternehmen { get; set; }
    public virtual DbSet&lt;Bauherr&gt; MyBauherr { get; set; }
    public virtual DbSet&lt;Baustelle&gt; MyBaustelle { get; set; }
    public virtual DbSet&lt;Kamera&gt; MyKamera { get; set; }
    public virtual DbSet&lt;Kameraprojekt&gt; MyKameraprojekt { get; set; }
    public virtual DbSet&lt;Bild&gt; MyBild { get; set; }

    public static ApplicationDbContext Create()
    {
        return new ApplicationDbContext();
    }


}
</code></pre>