该登录名来自不受信任的域,不能与 Windows 身份验证一起使用。

使用sql2008  远程连接数据库的时候遇到了这个问题,我用的是ADO.NET 实体数据模型,有app.config和web.config  解决了好久,因开始以为是sql的权限问题。后来解决了只需要在web.config中

<connectionStrings>
    <add name="ConnectionString" connectionString="Data Source=192.168.100.30;Initial Catalog=RsxCompany;Integrated Security=false;User ID=sa;Password=etm0802;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>
</connectionStrings>

将红色字体设为false

原文地址:https://www.cnblogs.com/dekevin/p/4707372.html