Showing posts with label current. Show all posts
Showing posts with label current. Show all posts

Friday, March 23, 2012

Login failed for user '(null)'

Hi.

Im trying to make a couple of reports online for other people. My current setup is:

Machine A: SQL05 server.
Machine B: ReportingServer05 and IIS 5.0 (XP machine).
Machine C: Client trying to connect to Machine B and view a report. (Windows 2003)

On Machine B everything is working just fine, i can view my reports without any problems.
But if i try viewing a report on Machine C, I get the following error:

An error has occurred during report processing. (rsProcessingAborted) Get Online Help

Cannot create a connection to data source 'IntegrationDB'.

(rsErrorOpeningConnection) Get Online Help

Login failed for user '(null)'. Reason: Not associated with a trusted SQL

Server connection.
But machine C kan browse http://machine-b/ReportServer and se the list of reports hosted, its when trying to generate the reports there is a problem. Im logged in on machine C with the same user as on Machine B.

My Shared Data Source in this VS05 project is setup to be using Integrated Security, so the "user '(null)'" part looks like Machine C dosnt supply the username, but why?

What is it that im missing in my configuration?
And any addional information needed?

Best Regards.
Lasse Stig Thomsen


You are running into a double-hop issue. Make sure Kerberos is enabled and configured correctly (the "real" solution").

Another thing you might try (not really a fix, but avoiding the problem) is to hard-code the credentials in your data source versus using Windows Integration.

|||Hi thanks for the answer. It worked like a charm with both solutions.

thanks gain.

Wednesday, March 21, 2012

Login failed for user '(null)'

Hi.

Im trying to make a couple of reports online for other people. My current setup is:

Machine A: SQL05 server.
Machine B: ReportingServer05 and IIS 5.0 (XP machine).
Machine C: Client trying to connect to Machine B and view a report. (Windows 2003)

On Machine B everything is working just fine, i can view my reports without any problems.
But if i try viewing a report on Machine C, I get the following error:

An error has occurred during report processing. (rsProcessingAborted) Get Online Help Cannot create a connection to data source 'IntegrationDB'. (rsErrorOpeningConnection) Get Online Help Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
But machine C kan browse http://machine-b/ReportServer and se the list of reports hosted, its when trying to generate the reports there is a problem. Im logged in on machine C with the same user as on Machine B.

My Shared Data Source in this VS05 project is setup to be using Integrated Security, so the "user '(null)'" part looks like Machine C dosnt supply the username, but why?

What is it that im missing in my configuration?
And any addional information needed?

Best Regards.
Lasse Stig Thomsen



You are running into a double-hop issue. Make sure Kerberos is enabled and configured correctly (the "real" solution").

Another thing you might try (not really a fix, but avoiding the problem) is to hard-code the credentials in your data source versus using Windows Integration.

|||Hi thanks for the answer. It worked like a charm with both solutions.

thanks gain.

Login failed for user

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

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 'NT AUTHORITY\NETWORK SERVICE'.

Source Error:

Line 15: Dim cmd As New SqlCommand
Line 16: con6 = New SqlConnection("Server=localhost;UID=sa;PWD=XXXX;Database=knowledge;integrated security=sspi")
Line 17: con6.Open()
Line 18: cmd.CommandText = "select Status from usr where Uid='" & txtUsername.Text & "' and Pass='" & txtPassword.Text & "'"
Line 19: cmd.Connection = con6


Source File:D:\Visual Studio 2005\Projects\WebApplication11\WebApplication11\login.aspx.vb Line:17

When I try the same code at my home computer it gives the same error as

Login failed for user 'BLACK-HULK\ASPNET'.

I am using XP at home and Server 2003 at the other computer, while debugging the application seems to be working fine dunno wat goes wrong while running it directly



I am not 100% sure, but when you use Integrated Security, the connection looks into windows and see who is logged on (basically). Thats why it says: LOGIN FAILED FOR USER 'BLACK-HULK\ASPNET.

As I see it, it gives no meaning of adding UID and PWD when you use Integrated Security.

Can you try removing Integratied security from you connectionstring.

|||

I would highly recommend against accessing your database with sa as a login. Also, as suggested before, using integrated security, kind of defeats the purpose of putting in a username and password ;)

HTH.

Peter