Hello Everyone,

I have developed an application for website using ASP.NET and SQL Server 2005. Recently I have uploaded it to server, but after uploading its showing the following error message -

Login failed for user ''. The user is not associated with a trusted SQL Server connection.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user ''. The user is not associated with a trusted SQL Server connection.

I wrote following connection string in web.config file-
<appSettings>

<add key="ConnectionString" value="Data Source=208.43.71.124;User ID=user;password=pass;Initial Catalog=dbname;Integrated Security=True" />

</appSettings>
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="brightlightConnectionString" connectionString="Data Source=208.43.71.124;User ID=user;password=pass;Initial Catalog=dbname;Integrated Security=True" providerName="System.Data.SqlClient"/>

</connectionStrings>

Is there anything wrong with the connection string?

Please help me out

Hello Catherine,

When I run the application in my local computer it was ok. I am getting the error after uploading it to the server.

Which authentication mode do you use?If you are using Windows Authentication, please change it to mixed mode and try again.

Which authentication mode do you use?If you are using Windows Authentication, please change it to mixed mode and try again.

Thanx a lot for your reply. I had solved it with following connectionstring setting-

<appSettings>

<add key="ConnectionString" value="Data Source=200.200.200.200,1433;Network Library=DBMSSOCN;Initial Catalog=regleinfotech;User ID=regleinfotech;Password=regleinfotech;" />

</appSettings>
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="regleinfotechConnectionString" ConnectionString="Data Source=200.200.200.200,1433;Network Library=DBMSSOCN;Initial Catalog=regleinfotech;User ID=regleinfotech;Password=regleinfotech;Integrated Security=True" providerName="System.Data.SqlClient"/>

</connectionStrings>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.