Saturday, March 24, 2012

Login failed for user NT AUTHORITY\NETWORK SERVICE


Mr :
I have proplem with Visual stdio 2003 and Windows2003
Enterprise Server , when I developed web application
using ASP.Net (VB) that establish connection to SQL Server
database the following error appeared.

Server Error in '/WebApplication1' Application.

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 97: Private Sub Page_Load(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load

Line 98: 'Put user code to initialize the page here

Line 99: Me.SqlDataAdapter1.Fill(DataSet11)

Line 100:

Line 101: End Sub

Source File: d:\inetpub\wwwroot\WebApplication1
\WebForm1.aspx.vb Line: 99

Stack Trace:

[SqlException: Login failed for user 'NT AUTHORITY\NETWORK
SERVICE'.]

System.Data.SqlClient.ConnectionPool.GetConnection
(Boolean& isInTransaction) +474

System.Data.SqlClient.SqlConnectionPoolManager.Get PooledCon
nection(SqlConnectionString options, Boolean&
isInTransaction) +372

System.Data.SqlClient.SqlConnection.Open() +384

System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection
connection, ConnectionState& originalState) +44

System.Data.Common.DbDataAdapter.FillFromCommand(O bject
data, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior)
+304

System.Data.Common.DbDataAdapter.Fill(DataSet dataSet,
Int32 startRecord, Int32 maxRecords, String srcTable,
IDbCommand command, CommandBehavior behavior) +77

System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38

WebApplication1.WebForm1.Page_Load(Object sender,
EventArgs e) in d:\inetpub\wwwroot\WebApplication1
\WebForm1.aspx.vb:99

System.Web.UI.Control.OnLoad(EventArgs e) +67

System.Web.UI.Control.LoadRecursive() +35

System.Web.UI.Page.ProcessRequestMain() +731Your SQL Server is propably configured to use Windows Authentication, and as
a default that User does not have access. You can use SQL Enterprise manager
to add this user to the list of allowed users.

This should also give you a little more information on the source of the
problem:
http://support.microsoft.com/defaul...1&Product=sql2k

"Ibrahim Mohamed El-Ganady" <anonymous@.discussions.microsoft.com> wrote in
message news:05ba01c3d423$36afa350$a601280a@.phx.gbl...
>
> Mr :
> I have proplem with Visual stdio 2003 and Windows2003
> Enterprise Server , when I developed web application
> using ASP.Net (VB) that establish connection to SQL Server
> database the following error appeared.
>
> Server Error in '/WebApplication1' Application.
> 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 97: Private Sub Page_Load(ByVal sender As
> System.Object, ByVal e As System.EventArgs) Handles
> MyBase.Load
> Line 98: 'Put user code to initialize the page here
> Line 99: Me.SqlDataAdapter1.Fill(DataSet11)
> Line 100:
> Line 101: End Sub
>
>
> Source File: d:\inetpub\wwwroot\WebApplication1
> \WebForm1.aspx.vb Line: 99
> Stack Trace:
>
> [SqlException: Login failed for user 'NT AUTHORITY\NETWORK
> SERVICE'.]
> System.Data.SqlClient.ConnectionPool.GetConnection
> (Boolean& isInTransaction) +474
> System.Data.SqlClient.SqlConnectionPoolManager.Get PooledCon
> nection(SqlConnectionString options, Boolean&
> isInTransaction) +372
> System.Data.SqlClient.SqlConnection.Open() +384
> System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection
> connection, ConnectionState& originalState) +44
> System.Data.Common.DbDataAdapter.FillFromCommand(O bject
> data, Int32 startRecord, Int32 maxRecords, String
> srcTable, IDbCommand command, CommandBehavior behavior)
> +304
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet,
> Int32 startRecord, Int32 maxRecords, String srcTable,
> IDbCommand command, CommandBehavior behavior) +77
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
> WebApplication1.WebForm1.Page_Load(Object sender,
> EventArgs e) in d:\inetpub\wwwroot\WebApplication1
> \WebForm1.aspx.vb:99
> System.Web.UI.Control.OnLoad(EventArgs e) +67
> System.Web.UI.Control.LoadRecursive() +35
> System.Web.UI.Page.ProcessRequestMain() +731
>

0 comments:

Post a Comment