Showing posts with label iis. Show all posts
Showing posts with label iis. Show all posts

Friday, March 30, 2012

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

Hi ,
I am using IIS 6.0 and have an ASP.NET where get the following error when
trying to connect from a .NET assembly.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
So I read some info from other forums and understand that I must add
the 'NT AUTHORITY\NETWORK SERVICE' as a user on my SQL Server 2005 database.
My problem is when I try to add this user by browsing for "Objects" in
Windows Server 2003, I don see this object. What am I missing?
Any ideas?By the way, my connection string is
"data source=NDS2214;Initial Catalog=UATP;Integrated Security=true"
"Opa" wrote:

> Hi ,
> I am using IIS 6.0 and have an ASP.NET where get the following error when
> trying to connect from a .NET assembly.
> Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
> So I read some info from other forums and understand that I must add
> the 'NT AUTHORITY\NETWORK SERVICE' as a user on my SQL Server 2005 databas
e.
> My problem is when I try to add this user by browsing for "Objects" in
> Windows Server 2003, I don see this object. What am I missing?
> Any ideas?

Login failed for user NT AUTHORITY\NETWORK SERVICE

I have built a web page in visual web developer express and I moved it over to use IIS. I gave NT AUTHORITY\NETWORK SERVICE read and write permissions to the folder and included it in my IIS virtual folder. I can see the login page just fine. I can create a user just fine. I can even access the forgot password page just fine. But if I try to login in I get this stack trace. I can't figure out what more I need to do for NT AUTHORITY\NETWORK SERVICE. Can any one help.

Server Error in '/' Application.

Cannot open user default database. Login failed.
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: Cannot open user default database. Login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

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): Cannot open user default database. Login failed.Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735043 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84 System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197 System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42 System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83 System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160 System.Web.UI.WebControls.Login.AttemptLogin() +105 System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

Hi matt,

You have using Integrated Security=SSPI in your connection string. You would have to use: User ID and Password.

Good Coding!

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/

|||

This is a common login failure when the application runs under IIS, and the 'NT AUTHORITY\NETWORK SERVICE' is the account used by IIS6.0. You may take a look at this post:

http://forums.asp.net/thread/1325077.aspx

sql

Login failed for user NT AUTHORITY\ANONYMOUS LOGON.

get the following error when a user tries to logon from work station.
The website is hosted on IIS on the same server as sql server 2005
website is asp.net 2.0

SqlException (0x80131904): Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734883
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehaviorrunBehavior, SqlCommand cmdHandler, SqlDataReader dataStream,BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)+1838
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentityidentity, SqlConnectionString connectionOptions, Object providerInfo,String newPassword, SqlConnection owningObject, BooleanredirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84
System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197
System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(Stringusername, Boolean updateLastLoginActivityDate, Int32& status,String& password, Int32& passwordFormat, String&passwordSalt, Int32& failedPasswordAttemptCount, Int32&failedPasswordAnswerAttemptCount, Boolean& isApproved,DateTime& lastLoginDate, DateTime& lastActivityDate) +1121
System.Web.Security.SqlMembershipProvider.CheckPassword(Stringusername, String password, Boolean updateLastLoginActivityDate, BooleanfailIfNotApproved, String& salt, Int32& passwordFormat) +105
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160
System.Web.UI.WebControls.Login.AttemptLogin() +105
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

Hi,

i think you have allowed ANONYMOUS Access to your website in the IIS Admin. The ASP.NET worker process using the ANONYMOUS user account and the process-user will connect to your SQL Database. Is that realy what you want? I think you have a special sql user account, or? So you must impersonate your asp.net worker process. See this MSDN Article for more information about impersonation:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vxconImpersonation.asp

Regards
Marc André

|||

thanks for the reply, I want to be able to use the NetworkService account.

"In Internet Information Services (IIS) 6, the default identity is the NetworkService account."

How do I go about setting this up so the website and sql server 2005 allow the NetworkService user?

|||

ghw123:

thanks for the reply, I want to be able to use the NetworkService account.

"In Internet Information Services (IIS) 6, the default identity is the NetworkService account."

How do I go about setting this up so the website and sql server 2005 allow the NetworkService user?

Try the link below for how to use T-SQL to grant the Networkservice account permissions in SQL Server to run Asp.net. Hope this helps.

http://www.thedatafarm.com/blog/PermaLink.aspx?guid=2bd8f8c8-1b16-46ee-91f6-d8d3080e562b

|||

Thanks for the reply I tried the

sp_grantlogin 'NT AUTHORITY\NETWORK SERVICE' on the master database

but no luck still get the same error msg.

|||

ghw123:

Thanks for the reply I tried the

sp_grantlogin 'NT AUTHORITY\NETWORK SERVICE' on the master database

but no luck still get the same error msg.

The first thing to do is verify in the Master database that the account was created and if yes then your only option is to use basic autthentication which could leave your application passwords in plain text. Hope this helps.

|||

Add the aspnet account to the SQL server 2005

Please have a look at thishttp://ambarishganguly.blogspot.com/2007/01/aspnet-account-and-sql-server.html. .

To add a user in SQL Server 2005, you can follow the following steps as outlined in

http://ambarishganguly.blogspot.com/2006/12/sql-server-2005-adding-user.html

In this way, you can easily use the website along with SQL Server 2005

Thanks

Ambarish.

|||

thanks for the replies,

this site was originally on a different server. I moved both the site and the database to the new server.

The problem was in one of the connection strings used on the site.
I had changed all but one of the strings to reflect the change of server name.
Once this string was changed as well then everything worked ok.

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

Hello all -

I'm trying to connect to a Sql Server 2005 database from my local development machine, which is running IIS 5.1 (Windows XP Pro). The web application is not using impersonation and has anonymous access enabled. In my system's machine.config file, I've set the processModel section to look like:

<processModel userName="System" password="AutoGenerate" />

This has been working fine for us connecting to SQL Server 2000 databases (running on Windows 2003). When we connect, I access Sql 2000 databases under the context of "OurDomain\MyMachineName$". However, we've recently installed Sql Server 2005 on a new Windows 2003 server & when I connect to that server, I receive the error:

System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

when trying to call the SqlConnection.Open() method. Our connection string is very basic:

Data Source=sql-dev2; Initial Catalog=TestDatabase; Integrated Security=True; Application Name=PrototypeWebservice;

In the Sql Server logins, we've granted the computer account "OurDomain\MyMachineName$" db_owner access to every database (in both Sql Server 2000 & 2005).

I am able to connect to the Sql Server 2005 databases if I change my section in machine.config to <processModel userName="OurDomina\myPersonalAccount" password="myPersonalPwd"/>, or if I move the application to an IIS6 server & set the application pool identity to NETWORK SERVICE, but we'd like to continue accessing our Sql Server 2005 databases (from our development machines running IIS5.1) as we currently access our Sql Server 2000 databases; under the context of "OurDomain\MyMachineName$".

Would anyone have any ideas why this would be happening or how to resolve? Thanks in advance.

Please check this blog: http://blogs.msdn.com/sql_protocols/archive/2006/12/02/understanding-kerberos-and-ntlm-authentication-in-sql-server-connections.aspx

.....

[1] "Login Failed for user 'NT Authority\ANONYMOUS' LOGON"

In this scenario, client make tcp connection, and it is most likely running under LocalSystem account, and there is no SPN registered for SQL instance, hence, NTLM is used, however, LocalSystem account inherits from System Context instead of a true user-based context, thus, failed as 'ANONYMOUS LOGON'. See http://support.microsoft.com/kb/132679.

The workaround here is

a. ask your domain administrator to manually register SPN if your SQL Server running under a domain user account.

b. use NP connection.

c. change your sql server to run under either localsystem account or networkservice account.

|||

That was the ticket!!! Thank you very much.

For future reference, the problem we ran into was that we had multiple active directory accounts registered with the same SPN. One entry was registered under the computer account sql server was running on & the other was the user account the sql server service was running under. We detected this by looking into the System event log on the domains PDC (the entry was EventID 11, Source KDC. Exact steps we followed were those suggested by other users on the thread: http://www.eventid.net/display.asp?eventid=11&eventno=569&source=KDC&phase=1). After removing the entry for the computer account, kerberos authentication succeeded.

Thanks again!

|||Thanks for the feedback.

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

I Still have problems.
Now I have two win 2k server, one with IIS and one with Sql Server 2k.
When I try to access from a client with 2k professional i have this error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT
AUTHORITY\ANONYMOUS LOGON'
Im using windows integration in both servers (IIS and SQL)
Can anyone help me!?
Riane Santos
http://www.experts-exchange.com/Data..._20800659.html
"Riane de Oliveira Torres Santos" <riane@.cpunet.com.br> wrote in message
news:OWyejbckEHA.3432@.TK2MSFTNGP14.phx.gbl...
> I Still have problems.
> Now I have two win 2k server, one with IIS and one with Sql Server 2k.
> When I try to access from a client with 2k professional i have this error:
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT
> AUTHORITY\ANONYMOUS LOGON'
> Im using windows integration in both servers (IIS and SQL)
> Can anyone help me!?
> Riane Santos
>

Wednesday, March 28, 2012

Login failed for user ''. The user is not associated with a trusted SQL Server connectio

My machine has Win XP and IIS 5.1.
I installed Visual Studio 2005 without SQL Express 2005. SQL Server
2005 is installed on another machine with Win 2003.
I created a Web Site in .NET VB. I created a connection with my SQL
server database, I can retrieve/ change data in SERVER EXPLORER. When I
try to create a gridview with data fron one table and to run the web
page in Internet Explorer I receive the following error.
Login failed for user ''. The user is not associated with a trusted SQL
Server connection.
Can you please help me ?
Which connection string are you using to connect to the database, I
guess you are using SQL Server authentication which isn=B4t setup
properly on your computer.
So switch to mixed authentication, or use a Windows account to connect
to the database-
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||Which connection string are you using to connect to the database, I
guess you are using SQL Server authentication which isn=B4t setup
properly on your computer.
So switch to mixed authentication, or use a Windows account to connect
to the database-
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||Hi
How do you set up your database? A Windows Authenication or Mixed?
<CLarkou@.gmail.com> wrote in message
news:1142862649.046140.21050@.z34g2000cwc.googlegro ups.com...
> My machine has Win XP and IIS 5.1.
> I installed Visual Studio 2005 without SQL Express 2005. SQL Server
> 2005 is installed on another machine with Win 2003.
> I created a Web Site in .NET VB. I created a connection with my SQL
> server database, I can retrieve/ change data in SERVER EXPLORER. When I
> try to create a gridview with data fron one table and to run the web
> page in Internet Explorer I receive the following error.
> Login failed for user ''. The user is not associated with a trusted SQL
> Server connection.
> Can you please help me ?
>
|||I am using the following:
<remove name="LocalSqlServer" />
<add name="SubDispConnectionString1" connectionString="Data
Source=CYNICSQL1;Initial Catalog=SubDisp;Integrated Security=True"
providerName="System.Data.SqlClient" />
|||Hi, I set it as "Integrated Security=True"
|||No, this is just the connection string, not themode SQL Server is set
to. The one (COnnectionString) is the client, the authentication mode
(mixed) is the server side.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||The reason people keep asking about authentication modes is that this error
message usually means you are trying to connect with a SQL Server login to a
SQL Server instance that only supports Windows authentication. It sounds
like this is not your issue because you are connecting with Integrated
Security and not supplying a user name or password. The other possible
cause is that the Windows user has no right to authenticate a Windows
connection on the server where SQL Server is running. This can be a "double
hop" error if you are using Windows authentication on the Web site. It
could also be a case that ASPUSER has no rights to connect to the SQL Server
machine.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
<CLarkou@.gmail.com> wrote in message
news:1142867073.546213.317310@.t31g2000cwb.googlegr oups.com...
> Hi, I set it as "Integrated Security=True"
>
|||I tried creating a website with FILE SYSTEM, not HTTP, and I was able
to open the web page in IE with SQL server data. ASPUSER is used for
connecting to the SQL SERVER machine with FILE SYSTEM web site ?
|||The server authentication is "Windows Authentication Mode".

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 'NT AUTHORITY\ANONYMOUS LOGON'

Hello all -

I'm trying to connect to a Sql Server 2005 database from my local development machine, which is running IIS 5.1 (Windows XP Pro). The web application is not using impersonation and has anonymous access enabled. In my system's machine.config file, I've set the processModel section to look like:

<processModel userName="System" password="AutoGenerate" />

This has been working fine for us connecting to SQL Server 2000 databases (running on Windows 2003). When we connect, I access Sql 2000 databases under the context of "OurDomain\MyMachineName$". However, we've recently installed Sql Server 2005 on a new Windows 2003 server & when I connect to that server, I receive the error:

System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

when trying to call the SqlConnection.Open() method. Our connection string is very basic:

Data Source=sql-dev2; Initial Catalog=TestDatabase; Integrated Security=True; Application Name=PrototypeWebservice;

In the Sql Server logins, we've granted the computer account "OurDomain\MyMachineName$" db_owner access to every database (in both Sql Server 2000 & 2005).

I am able to connect to the Sql Server 2005 databases if I change my section in machine.config to <processModel userName="OurDomina\myPersonalAccount" password="myPersonalPwd"/>, or if I move the application to an IIS6 server & set the application pool identity to NETWORK SERVICE, but we'd like to continue accessing our Sql Server 2005 databases (from our development machines running IIS5.1) as we currently access our Sql Server 2000 databases; under the context of "OurDomain\MyMachineName$".

Would anyone have any ideas why this would be happening or how to resolve? Thanks in advance.

Please check this blog: http://blogs.msdn.com/sql_protocols/archive/2006/12/02/understanding-kerberos-and-ntlm-authentication-in-sql-server-connections.aspx

.....

[1] "Login Failed for user 'NT Authority\ANONYMOUS' LOGON"

In this scenario, client make tcp connection, and it is most likely running under LocalSystem account, and there is no SPN registered for SQL instance, hence, NTLM is used, however, LocalSystem account inherits from System Context instead of a true user-based context, thus, failed as 'ANONYMOUS LOGON'. See http://support.microsoft.com/kb/132679.

The workaround here is

a. ask your domain administrator to manually register SPN if your SQL Server running under a domain user account.

b. use NP connection.

c. change your sql server to run under either localsystem account or networkservice account.

|||

That was the ticket!!! Thank you very much.

For future reference, the problem we ran into was that we had multiple active directory accounts registered with the same SPN. One entry was registered under the computer account sql server was running on & the other was the user account the sql server service was running under. We detected this by looking into the System event log on the domains PDC (the entry was EventID 11, Source KDC. Exact steps we followed were those suggested by other users on the thread: http://www.eventid.net/display.asp?eventid=11&eventno=569&source=KDC&phase=1). After removing the entry for the computer account, kerberos authentication succeeded.

Thanks again!

|||Thanks for the feedback.

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

I published my web pages using Visual Studio 2005 to a local IIS server, the local machine has a proxie, when I published the pages on my personal laptop with a practice database on a SQL server it runs find, but when I put it on the machine with the actual running database on SQL Server 2005 I get the following error, can any please let me know what I can do to fix this problem.

Server Error in '/BPAlarmQuery' Application.

Login failed for user 'ODOWIN911\ASPNET'.

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 'ODOWIN911\ASPNET'.

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 'ODOWIN911\ASPNET'.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734787 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770 System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +92 System.Web.UI.WebControls.ListControl.PerformSelect() +31 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +26 System.Web.UI.Control.PreRenderRecursiveInternal() +77 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

Thank you in advance.

Try the suggestions on this page:

http://msdn2.microsoft.com/en-us/library/ab4e6cky.aspx

login failed for user

I have XP Pro installed with SQl Server 7.0. I use Visual
Studio.NET for programming ASP.NET(IIS is also
installed).When I run this, I get an error message

"login failed for user VENKY/ASPNET".

I did some search and many poeple seem to have these
errors but not one page says what is to be clearly done
for XP platform. One page said that I have to create a
domain user ASPNET and see to that this user has access
rights to SQL Server. COuld someone please tell the steps
to do this. Thanks a lot in advance.

Gayathri
.Is your sql server and iis running on the same machine ? What is your anonymous login set to under iis ?|||Originally posted by rnealejr
Is your sql server and iis running on the same machine ? What is your anonymous login set to under iis ?

Yes they are running on the same machine. Sorry what do you mean by anonymous login, where do you go and see that. Anyway yesterday we solved the problem somehow, did further research on the web and somehow solved it.

Thanks,

Gayathri|||To check the anonymous account used in iis - go into internet service manager. Right click on 'default web site'. Click on 'directory security' -> click edit under 'anonymous access ...) -> click edit under 'anonymous access'.

The solution may have been adding that username to sql server or the anonymous access login to sql server.

For future reference - the following is a helpful article from ms:

article (http://support.microsoft.com/default.aspx?scid=kb;EN-US;247931)sql

Friday, March 9, 2012

Login and Operation Problem

I've a site configured with SQL Server 2000, RS2000, ColdFusion, and IIS 6.0 and was delivered a prototype application written with VS2005. It wouldn't run until I upgraded the site to ASP.NET 2.0 and now I can't login to RS2000 to deploy a VS2005 developed report. It repeatedly prompts for my username/password. I am also having problems determining it the ASP.NET 2.0 installation is properly configured. Is it possible to deploy VS2005 reports to a RS2000 installation running ASP.NET 2.0 or am I wasting my time. I suspected as much when I started but the demonstation of the VS2005 website is a high-priority with my customer.

From Microsoft's website: http://msdn2.microsoft.com/en-us/library/ms143520.aspx

Report definition (.rdl) files that you create in the SQL Server 2005 version of Report Designer can only be published to a SQL Server 2005 report server.

login 101..

What is the difference between 'Windows Authentication' login and 'SQL
login'? I have IIS, MSDE installed on my home computer and I don't log
into windows. So how does 'Windows Authentication' apply in this case?
Thanks,
RABMissouriIt depends on what operating system you are running at home.
In some cases, even though you don't explicitly log in, you
are being logged in when the computer starts up. It's just
transparent to the user.
What OS are you running at home?
-Sue
On 22 May 2006 08:31:41 -0700, "RAB" <rabmissouri@.yahoo.com>
wrote:

>What is the difference between 'Windows Authentication' login and 'SQL
>login'? I have IIS, MSDE installed on my home computer and I don't log
>into windows. So how does 'Windows Authentication' apply in this case?
>
>Thanks,
>RABMissouri|||On 22 May 2006 08:31:41 -0700, RAB wrote:

>What is the difference between 'Windows Authentication' login and 'SQL
>login'?
Hi RABMissouri,
Windows authentication - SQL Server uses a special protocol to ask
Windows for the details of the currently logged-in user. If the Windows
user is in the list of allowed logins, the login succeeds wiithout the
user having to enter anything. If the Windows login is not registered as
a SQL Server login, an error message follows.
Advantages: no extra login prompts for user; SQL Server security
benefits from Windows login policies (such as password aging, etc).
Disadvantages: doesn't lend itself for testing; Windows users with admin
rights are automatically logged in as SQL Server admin.
SQL Server login - SQL Server prompts user for loginname and password,
then compares this to list of loginnames and (encrypted) passwords in
system table master..syslogins. On a match, you are logged in.
Advantages: easy when you have to test seecurity for different roles.
Disadvantages: no password expiration, password complexity checks, etc.

> I have IIS, MSDE installed on my home computer and I don't log
>into windows. So how does 'Windows Authentication' apply in this case?
What version of Windows are yoou using?
Hugo Kornelis, SQL Server MVP|||Windows XP Professional...
Thanks,
RABMissouri|||Just a correction for the SQL Authentication description:
On Windows 2003, SQL Server 2005 can enforce the Windows password complexity
and expiration policy for SQL logins.
Thanks
Laurentiu Cristofor [MSFT]
Software Design Engineer
SQL Server Engine
http://blogs.msdn.com/lcris/
This posting is provided "AS IS" with no warranties, and confers no rights.
"Hugo Kornelis" <hugo@.perFact.REMOVETHIS.info.INVALID> wrote in message
news:bsf472h1m7vuhpjlhfi55eekqe47r7nte3@.
4ax.com...
> On 22 May 2006 08:31:41 -0700, RAB wrote:
>
> Hi RABMissouri,
> Windows authentication - SQL Server uses a special protocol to ask
> Windows for the details of the currently logged-in user. If the Windows
> user is in the list of allowed logins, the login succeeds wiithout the
> user having to enter anything. If the Windows login is not registered as
> a SQL Server login, an error message follows.
> Advantages: no extra login prompts for user; SQL Server security
> benefits from Windows login policies (such as password aging, etc).
> Disadvantages: doesn't lend itself for testing; Windows users with admin
> rights are automatically logged in as SQL Server admin.
> SQL Server login - SQL Server prompts user for loginname and password,
> then compares this to list of loginnames and (encrypted) passwords in
> system table master..syslogins. On a match, you are logged in.
> Advantages: easy when you have to test seecurity for different roles.
> Disadvantages: no password expiration, password complexity checks, etc.
>
> What version of Windows are yoou using?
> --
> Hugo Kornelis, SQL Server MVP|||If you aren't logging in then I would guess you are using
the Welcome screen login option. The user you select is the
user that is logged into windows for you. That is the login
that would access MSDE on your computer if you were using
osql, admin tools, etc. Depending on other settings but
generally if your web site is using Windows Authentication,
it will log into SQL Server using the ComputerName\ASPNET
login.
That's basically how it would work. There is a login
associated with you as well as IIS that can be used as
windows logins in SQL Server.
-Sue
On 22 May 2006 18:40:57 -0700, "RAB" <rabmissouri@.yahoo.com>
wrote:

>Windows XP Professional...
>Thanks,
>RABMissouri