Re: SQLConnection Help



This was discussed recently:

http://groups-beta.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/d5add5600a526490/9c72794fbca0d600?q=brock+ASPNET+database&rnum=1#9c72794fbca0d600

-Brock
DevelopMentor
http://staff.develop.com/ballen



I make an project in ASP that use SQL Server that is on the same
computer at
compilation time I have the problem  :
Login failed for user 'NOSTRU\IUSR_NOSTRU'.
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 'NOSTRU\IUSR_NOSTRU'.

Source Error:

Line 31: //			if (sqlConnection1.State==ConnectionState.Open)
Line 32: //			{
Line 33: 				sqlDataAdapter1.Fill(dataSet11);
Line 34: 				this.DataGrid1.DataBind();
Line 35: //			}
Source File: c:\inetpub\wwwroot\Servici\WebForm1.aspx.cs    Line: 33

Stack Trace:

[SqlException: Login failed for user 'NOSTRU\IUSR_NOSTRU'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction) +474

System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(Sql
ConnectionString
options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection
connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object 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
Servici.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\Servici\WebForm1.aspx.cs:33
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
----------------------------------------------------------------------
----------

Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET Version:1.1.4322.2032

How I can resolve this problem ?




.



Relevant Pages

  • Error Trying to Launch Project
    ... startRecord, Int32 maxRecords, String srcTable, IDbCommand command, ... CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet ... dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand ...
    (microsoft.public.dotnet.distributed_apps)
  • ThreadAbortException at System.Data.SqlClient.SqlCommand.ExecuteRe (BIS)
    ... startRecord, Int32 maxRecords, String srcTable, IDbCommand command, ... CommandBehavior behavior) ...
    (microsoft.public.dotnet.framework.adonet)
  • ThreadAbortException at System.Data.SqlClient.SqlCommand.ExecuteRe
    ... When i launch the same code sometimes it never crash a the same place but ... startRecord, Int32 maxRecords, String srcTable, IDbCommand command, ... CommandBehavior behavior) ...
    (microsoft.public.dotnet.framework.adonet)
  • datagrid error
    ... Server]Line 1: Incorrect syntax near '.'.] ... startRecord, Int32 maxRecords, String srcTable, IDbCommand command, ... CommandBehavior behavior) +77 ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Need Help with Web Service Code ...
    ... startRecord, Int32 maxRecords, String srcTable, IDbCommand command, ... CommandBehavior behavior) ...
    (microsoft.public.dotnet.framework.aspnet.webservices)