mercredi 7 décembre 2016

Multiple connection string with different users in my web.config?

I have my web.config like this:

<connectionStrings>
     <add name="myConnectionString"
         connectionString="Data Source=PC1; 
                           Initial Catalog=BD1; 
                           Integrated Security=SSPI"
         providerName="System.Data.SqlClient"/>
      <add name="myConnectionString2"
         connectionString="Data Source=PC2; 
                           Initial Catalog=BD2; 
                           Integrated Security=False;
                           User Id=usuario;
                           Password=pass"
         providerName="System.Data.SqlClient"/>
</connectionStrings>

I can connect to the first one, a database with my windows user auth, but i can not to the second one, a database with other windows user auth.

I can run Sql Server as other user, and i can connect to the database.

Aucun commentaire:

Enregistrer un commentaire