User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 455,979 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,786 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser: Programming Forums
Views: 1704 | Replies: 4
Reply
Join Date: Nov 2007
Posts: 3
Reputation: stabiloGenuis is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
stabiloGenuis stabiloGenuis is offline Offline
Newbie Poster

Help (Help Please) - Config Error: "Login failed for user 'STS-SYNMAC\userName

  #1  
Nov 30th, 2007
Hi,

I have created a Crystal Report Viewer. When compiled on my machine it works fine. However, earlier this week I had to make a copy onto a server. When doing this I had encountered several problems that I maanged to solve...except for one :o(.

No matter what I try I still get the following error..."Login failed for user 'STS-SYNMAC\userName'".

Login failed for user 'STS-SYNMAC\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 'STS-SYNMAC\userName'.

Source Error:

Line 70: try
Line 71: {
Line 72: conn.Open();
Line 73: /*===Creating an SqlCommand object for the established connection &
Line 74: executing the data reader using the SqlDataReader===*/


Source File: c:\Inetpub\wwwroot\OTReports\RViewer.aspx.cs Line: 72

Stack Trace:

[SqlException (0x80131904): Login failed for user 'STS-SYNMAC\userName'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1956
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.Attemp

ETC..

In my config file, I have tried the following but nothing seems to work...

<?xml version="1.0"?>
<!--
-->
<configuration>
<!--<system.web>
<pages enableEventValidation="false"/>
<compilation debug="true"/>
</system.web>-->

<appSettings>
<add key="CrystalImageCleaner-AutoStart" value="true" />
<add key="CrystalImageCleaner-Sleep" value="60000" />
<add key="CrystalImageCleaner-Age" value="120000" />
<add key="ConnectionString" value="Data Source=SVRSQL35;Initial Catalog=OTReports;Integrated Security=True" />

<!--<add name="ConnectionString" connectionString="Data Source=SVRSQL35;User ID=STS-SYNMAC\userName;Password=pass07;database=OTReports" providerName="System.Data.SqlClient"/>-->

<add key ="ConnectionString" value="Persist Security Info=False;Connection Timeout=20;database=OTReports;server=SVRSQL35;User Id=STS-SYNMAC\userName;Password=pass07"/>

<!--<add key ="ConnectionString" value="Persist Security Info=False;Connection Timeout=20;database=OTReports;server=SVRSQL35;User Id=STS-SYNMAC\userName;Password=pass07"/>-->

<!--<add key="ConnectionString" value="Data Source=SVRSQL35;Initial Catalog=OTReports;Integrated Security=True;User Id=STS-SYNMAC\userName;password=pass07"/>-->


</appSettings>
<connectionStrings>
<add name="OTReportsConnectionString" connectionString="Data Source=SVRSQL35;Initial Catalog=OTReports;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="OTReportsConnectionString2" connectionString="Data Source=SVRSQL35;Initial Catalog=OTReports;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="OTReportsConnectionString3" connectionString="Data Source=SVRSQL35;Initial Catalog=OTReports;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="OTReportsConnectionString4" connectionString="Data Source=SVRSQL35;Initial Catalog=OTReports;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="OTReportsConnectionString5" connectionString="Data Source=SVRSQL35;Initial Catalog=OTReports;Integrated Security=True" providerName="System.Data.SqlClient"/>
<system.web>
ETC..

I am so desperate for help because I really dont know what I am doing...
Any help given would be apreciated.

Thank you in advance
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2006
Location: Bonners Ferry, ID
Posts: 280
Reputation: JerryShaw is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 39
JerryShaw JerryShaw is offline Offline
Posting Whiz in Training

Re: (Help Please) - Config Error: "Login failed for user 'STS-SYNMAC\userName

  #2  
Nov 30th, 2007
This error occurs simply because you do not have a user established on that SQL server with that name. If the user is Windows Authenticated, then it will use the logged in user name and domain [domain]\[logged in user name]. If "STS-SYNMAC\userName" is not a valid user in that domain, and that domain is allowed on that SQL server, then you will get the error.

If using SQL Authentication, then you will have to first make sure the SQL server allows that option, and make sure you have a user with that name.
Reply With Quote  
Join Date: Nov 2007
Posts: 3
Reputation: stabiloGenuis is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
stabiloGenuis stabiloGenuis is offline Offline
Newbie Poster

Help Re: (Help Please) - Config Error: "Login failed for user 'STS-SYNMAC\userName

  #3  
Nov 30th, 2007
Hi,

The user is Windows Authenticated, and is a valid user...
but for some reason...it still doesnt allow me to connect.
I have tested to see if the user is valid by connecting to a remote desktop and everything seems fine on there...

When running the program off my machine locally I ercounter no problems...however, since i made a copy to one of our terminal servers and this is where i am getting the error...

I defo think something is wrong with my ConnectionStrings...?

Could you possibly suggest anything??

Many Thanks
Reply With Quote  
Join Date: Nov 2006
Location: Bonners Ferry, ID
Posts: 280
Reputation: JerryShaw is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 39
JerryShaw JerryShaw is offline Offline
Posting Whiz in Training

Re: (Help Please) - Config Error: "Login failed for user 'STS-SYNMAC\userName

  #4  
Dec 1st, 2007
Okay, this web server is connecting to an SQL Server. Is the SQL Server on the same machine as the WebServer ?
If so, is the SQL Server part of the same domain as the WebServer ? And is that Domain named "STS-SYNMAC" ? and do you have the SQL Server setup to authenticate users of that domain ?, and is the "userName" Windows account valid in that domain ?
Use SQL Studio to explicity allow this Domain\Account, and give it rights to the OReports catalog.

This is purely an authentication problem on that server. Can you launch a Windows App on that server, and see if it can connect to the SQL server ?
Reply With Quote  
Join Date: Oct 2007
Posts: 166
Reputation: Jugortha is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 12
Jugortha Jugortha is offline Offline
Junior Poster

Re: (Help Please) - Config Error: "Login failed for user 'STS-SYNMAC\userName

  #5  
Dec 19th, 2007
I guess that u should give set the user and password doing so :

ReportDocument.SetDatabaseLogon("user", "password");
The ReportDocument is your crystal report object in the new empalcement
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C# Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the C# Forum

All times are GMT -4. The time now is 9:21 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC