We help IT Professionals succeed at work.
Get Started

Crystal Report in ASP web app Error Login failed for user 'MYDOMAIN\username'.

Last Modified: 2012-06-21
Hi all,

I created a crystal report and deployed it to a test server, i call it from my web application by clicking on a button, when I do I get an error on the page (See Attached)

The thing that confuses me is I tried logging into the database using the same user and I was able to!!!  is something wrong with permissions or my connection string?

Connection string looks like this:

Conn.ConnectionString = "Data Source=servername;Initial Catalog=xxxxxx;Integrated Security=False;user id=MYDOMAIN\\username;password=sssssss;";

Server Error in '/APP' Application.

Login failed for user 'MYDOMAIN\username'. 
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 'MYDOMAIN\username'.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 

[SqlException (0x80131904): Login failed for user 'MYDOMAIN\username'.]
   MYReports._Default.Page_Load(Object sender, EventArgs e) in C:\Users\saa\Documents\Visual Studio 2008\Projects\APP\MYReports\Report.aspx.cs:35
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082

Open in new window

Watch Question
Top Expert 2010
This problem has been solved!
Unlock 1 Answer and 15 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE