Suhail Mumtaz Awan Suhail Mumtaz Awan - 3 months ago 67
ASP.NET (C#) Question

Login failed. The login is from an untrusted domain

Introduction
I deployed my application Here on GearHost, everything went well. I clearly understand that its database access issue within application because some of the pages are accessible where no db connection is required like about-us.

Error : Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

Connection String

<add name="IMConn" connectionString="Data Source=mssql3.gear.host;Initial Catalog=IMDb;Integrated Security=True;user id=****;password=******" providerName="System.Data.SqlClient" />


If someone have idea about that problem, please help.Thanks for your time.

Answer

Try IntegratedSecurity = false;

<add name="IMConn" connectionString="Data Source=mssql3.gear.host;Initial Catalog=IMDb;Integrated Security=False;user id=****;password=******"  providerName="System.Data.SqlClient" />