Ask a Question related to ASP.NET General, Design and Development.
-
Kevin Spencer #1
Re: need a help
Check your user name and password being passed in the Connection String, and
make sure that SQL Server Authentication is being used on the SQL Server and
in your code.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
[url]http://www.takempis.com[/url]
Complex things are made up of
lots of simple things.
"Hamza Al Ali" <hamza.alali@link.net.jo> wrote in message
news:ezso4FCXDHA.652@TK2MSFTNGP10.phx.gbl...user> Hi,
>
> I am new at ASP.NET, and I need some help from you.
>
> I am started with a first example got it from MSDN related to the
> Studio.NET, I am going through the example step by step.
>
> The example is easy and simple which is about how to display data from
> database (Pubs) on web page using dataset (SQL Server 7). actually i know
> the username but i do not the password of it, so i created a new login
> (username: "pupuser", password: "pupuser") for the database and i used it
> in the example.
>
> But when i make run for the application I got the following error message:
> Login failed for user 'pupuser'.
> 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 forstartRecord,> 'pupuser'.
>
> Source Error:
>
> Line 3:
> Line 4: Public Sub FillDataSet(ByVal dSet As MyDataSet)
> Line 5: SqlDataAdapter1.Fill(dSet)
> Line 6: End Sub
> Line 7: #Region " Component Designer generated code "
>
>
> Source File: c:\inetpub\wwwroot\MyWebForm\Component1.vb Line: 5
>
> Stack Trace:
>
> [SqlException: Login failed for user 'pupuser'.]
> System.Data.SqlClient.SqlConnection.Open() +761
> System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
> ConnectionState& originalState) +44
> System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord,
> Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> behavior) +98
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32> Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> behavior) +77
> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
> MyWebForm.Component1.FillDataSet(MyDataSet dSet) in
> c:\inetpub\wwwroot\MyWebForm\Component1.vb:5
> MyWebForm.WebForm1.Page_Load(Object sender, EventArgs e) in
> c:\inetpub\wwwroot\MyWebForm\WebForm1.aspx.vb:33
> System.Web.UI.Control.OnLoad(EventArgs e) +67
> System.Web.UI.Control.LoadRecursive() +29
> System.Web.UI.Page.ProcessRequestMain() +724
>
>
>
>
>
> Best regards.....................
>
>
>
Kevin Spencer Guest
-
Hamza Al Ali #2
need a help
Hi,
I am new at ASP.NET, and I need some help from you.
I am started with a first example got it from MSDN related to the
Studio.NET, I am going through the example step by step.
The example is easy and simple which is about how to display data from
database (Pubs) on web page using dataset (SQL Server 7). actually i know
the username but i do not the password of it, so i created a new login
(username: "pupuser", password: "pupuser") for the database and i used it
in the example.
But when i make run for the application I got the following error message:
Login failed for user 'pupuser'.
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
'pupuser'.
Source Error:
Line 3:
Line 4: Public Sub FillDataSet(ByVal dSet As MyDataSet)
Line 5: SqlDataAdapter1.Fill(dSet)
Line 6: End Sub
Line 7: #Region " Component Designer generated code "
Source File: c:\inetpub\wwwroot\MyWebForm\Component1.vb Line: 5
Stack Trace:
[SqlException: Login failed for user 'pupuser'.]
System.Data.SqlClient.SqlConnection.Open() +761
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +98
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
MyWebForm.Component1.FillDataSet(MyDataSet dSet) in
c:\inetpub\wwwroot\MyWebForm\Component1.vb:5
MyWebForm.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\MyWebForm\WebForm1.aspx.vb:33
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +724
Best regards.....................
Hamza Al Ali Guest
-
Hamza Al Ali #3
Re: need a help
I did, and I tried to connect to the same database with the same username
and password by asp code and it was connect successfuly without
errors.????????
and> Check your user name and password being passed in the Connection String,and> make sure that SQL Server Authentication is being used on the SQL Serverknow> in your code.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> [url]http://www.takempis.com[/url]
> Complex things are made up of
> lots of simple things.
>
> "Hamza Al Ali" <hamza.alali@link.net.jo> wrote in message
> news:ezso4FCXDHA.652@TK2MSFTNGP10.phx.gbl...> > Hi,
> >
> > I am new at ASP.NET, and I need some help from you.
> >
> > I am started with a first example got it from MSDN related to the
> > Studio.NET, I am going through the example step by step.
> >
> > The example is easy and simple which is about how to display data from
> > database (Pubs) on web page using dataset (SQL Server 7). actually iit> > the username but i do not the password of it, so i created a new login
> > (username: "pupuser", password: "pupuser") for the database and i usedmessage:> > in the example.
> >
> > But when i make run for the application I got the following error> user> > Login failed for user 'pupuser'.
> > 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> startRecord,> > 'pupuser'.
> >
> > Source Error:
> >
> > Line 3:
> > Line 4: Public Sub FillDataSet(ByVal dSet As MyDataSet)
> > Line 5: SqlDataAdapter1.Fill(dSet)
> > Line 6: End Sub
> > Line 7: #Region " Component Designer generated code "
> >
> >
> > Source File: c:\inetpub\wwwroot\MyWebForm\Component1.vb Line: 5
> >
> > Stack Trace:
> >
> > [SqlException: Login failed for user 'pupuser'.]
> > System.Data.SqlClient.SqlConnection.Open() +761
> > System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
> > ConnectionState& originalState) +44
> > System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord,
> > Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> > behavior) +98
> > System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32>> > Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
> > behavior) +77
> > System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
> > MyWebForm.Component1.FillDataSet(MyDataSet dSet) in
> > c:\inetpub\wwwroot\MyWebForm\Component1.vb:5
> > MyWebForm.WebForm1.Page_Load(Object sender, EventArgs e) in
> > c:\inetpub\wwwroot\MyWebForm\WebForm1.aspx.vb:33
> > System.Web.UI.Control.OnLoad(EventArgs e) +67
> > System.Web.UI.Control.LoadRecursive() +29
> > System.Web.UI.Page.ProcessRequestMain() +724
> >
> >
> >
> >
> >
> > Best regards.....................
> >
> >
> >
>
Hamza Al Ali Guest



Reply With Quote

