Click here to Skip to main content
15,900,553 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have created a web application in asp.net with SQL.I have mentioned ConnectionString in web.config as follows:
XML
<connectionStrings>
  <add name="xyzConnectionString" connectionString="Data Source=.\SQLEXPRESS; Initial Catalog=XYZ;Integrated Security=True;Trusted_Connection=No" providerName="System.Data.SqlClient"/>
  </connectionStrings>

But when i am uploading this webapplication on Parallels Plesk Panel Dedicated server and connect with database then i am getting an error as follows::

Server Error in '/' Application.
Login failed for user ''.
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 ''.


Please help me.
Thanks in advance.
Posted
Updated 16-Jun-11 7:39am
v2

Hi,
Change your connection string as below
Data Source=.\SQLEXPRESS; Initial Catalog=XYZ;User ID=personal; Integrated Security=SSPI;Persist Security Info=False;

you may find these resources useful
http://blogs.msdn.com/b/sql_protocols/archive/2008/05/03/understanding-the-error-message-login-failed-for-user-the-user-is-not-associated-with-a-trusted-sql-server-connection.aspx[^]
http://geekswithblogs.net/ranganh/archive/2005/05/25/40489.aspx[^]
 
Share this answer
 
Comments
Monjurul Habib 16-Jun-11 18:25pm    
my 5 for advice and links.hope it will help.
change the
C++
Trusted_Connection=No
to
C++
Trusted_Connection=Yes
 
Share this answer
 
Put Trusted_Connection=Yes in connection string.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900