Login failed for user ‘xxx\Guest’ using asp.net/sqlserver
March 21, 2012 2 Comments
Hi Friends,
Today my post is resolve the issue Login failed for user ‘xxx\Guest’ after long time i got a solution it’s very simple problem with connection string.
1.if you using authentication in sql server then use your connection string should be like this
Data Source=servername;Initial Catalog=databasename;User ID=username;Password=password;Pooling=false;Connect Timeout=45;
**Note: if you mention Integrated Security=True; in connection string surely you ll get that lagin failed exception like shown below.
example: Data Source=servername;Initial Catalog=databasename;User ID=sa;Password=admin123; Integrated Security=True; Pooling=false;Connect Timeout=45;
2.If you not using authentication in sqlserver use below format connection string
Data Source=servername;Initial Catalog=databasename;Integrated Security=True;Pooling=false;Connect Timeout=45;
** Any doubt comment me.