Showing posts with label sources. Show all posts
Showing posts with label sources. Show all posts

Tuesday, March 13, 2012

The IListSource does not contain any data sources.

Hello:

I have migrated a site from IIS5 to IIS6. The site is configured and the we
app is installed on the new IIS site. I can get to the web page but when I
try to login, this is what I get the following error below. I would
appreciate any insight, direction or help regarding this.

Thank-you!!

Walid

************************************************** ************************************************** ********************
Server Error in '/' Application.
------------------------

The IListSource does not contain any data sources.
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.Web.HttpException: The IListSource does not
contain any data sources.

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:

[HttpException (0x80004005): The IListSource does not contain any data
sources.]
System.Web.UI.DataSourceHelper.GetResolvedDataSour ce(Object dataSource,
String dataMember) +376
System.Web.UI.WebControls.ListControl.OnDataBindin g(EventArgs e) +75
System.Web.UI.Control.DataBind() +26
T5DB.StartPage.Page_Load(Object sender, EventArgs e) +259
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +739
************************************************** **********
************************************************** **********Did you trace your code and see where it is failing
somehow your data binding is failing, you are not getting data or something.
Limited info given.

OZI

"Walid" <Walid@.discussions.microsoft.comwrote in message
news:9BCC27C8-8E9C-4100-9F57-6C0424B789F0@.microsoft.com...

Quote:

Originally Posted by

Hello:
>
I have migrated a site from IIS5 to IIS6. The site is configured and the
we
app is installed on the new IIS site. I can get to the web page but when
I
try to login, this is what I get the following error below. I would
appreciate any insight, direction or help regarding this.
>
Thank-you!!
>
Walid
>
************************************************** ************************************************** ********************
Server Error in '/' Application.
------------------------
>
The IListSource does not contain any data sources.
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.Web.HttpException: The IListSource does not
contain any data sources.
>
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:
>
[HttpException (0x80004005): The IListSource does not contain any data
sources.]
System.Web.UI.DataSourceHelper.GetResolvedDataSour ce(Object dataSource,
String dataMember) +376
System.Web.UI.WebControls.ListControl.OnDataBindin g(EventArgs e) +75
System.Web.UI.Control.DataBind() +26
T5DB.StartPage.Page_Load(Object sender, EventArgs e) +259
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +739
************************************************** **********
************************************************** **********
>
>


Thank-you for replying!
I am very new to .NET and programming, very new :-) How can I trace my
code? What more information can I provide to get some more help? Your
assistance is much appreciated.

Walid

"OZI" wrote:

Quote:

Originally Posted by

Did you trace your code and see where it is failing
somehow your data binding is failing, you are not getting data or something.
Limited info given.
>
OZI
>
>
"Walid" <Walid@.discussions.microsoft.comwrote in message
news:9BCC27C8-8E9C-4100-9F57-6C0424B789F0@.microsoft.com...

Quote:

Originally Posted by

Hello:

I have migrated a site from IIS5 to IIS6. The site is configured and the
we
app is installed on the new IIS site. I can get to the web page but when
I
try to login, this is what I get the following error below. I would
appreciate any insight, direction or help regarding this.

Thank-you!!

Walid

************************************************** ************************************************** ********************
Server Error in '/' Application.
------------------------

The IListSource does not contain any data sources.
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.Web.HttpException: The IListSource does not
contain any data sources.

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:

[HttpException (0x80004005): The IListSource does not contain any data
sources.]
System.Web.UI.DataSourceHelper.GetResolvedDataSour ce(Object dataSource,
String dataMember) +376
System.Web.UI.WebControls.ListControl.OnDataBindin g(EventArgs e) +75
System.Web.UI.Control.DataBind() +26
T5DB.StartPage.Page_Load(Object sender, EventArgs e) +259
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +739
************************************************** **********
************************************************** **********


>
>
>


Simply put,

set a BreakPoint ( need be in Debugging mode and not in Release Mode) in
your Page_Load event handler. Read about debugging and how to set a
breakpoint if you don't know how.
use F11 to step through the code line by line, to narrow down where the
error is occurring.
use F10 to step over etc...

I am assuming you are getting some data from a database to authenticate the
user etc..
check if you are getting any data back if you expecting data back.
You said that things break after you try to login, are you being
authenticated?

Without seeing any code it is very difficult to help you out.

OZI

"Walid" <Walid@.discussions.microsoft.comwrote in message
news:295842A1-E1B6-4C51-AF18-B9221924F8C1@.microsoft.com...

Quote:

Originally Posted by

Thank-you for replying!
I am very new to .NET and programming, very new :-) How can I trace my
code? What more information can I provide to get some more help? Your
assistance is much appreciated.
>
Walid
>
"OZI" wrote:
>

Quote:

Originally Posted by

>Did you trace your code and see where it is failing
>somehow your data binding is failing, you are not getting data or
>something.
>Limited info given.
>>
>OZI
>>
>>
>"Walid" <Walid@.discussions.microsoft.comwrote in message
>news:9BCC27C8-8E9C-4100-9F57-6C0424B789F0@.microsoft.com...

Quote:

Originally Posted by

Hello:
>
I have migrated a site from IIS5 to IIS6. The site is configured and
the
we
app is installed on the new IIS site. I can get to the web page but
when
I
try to login, this is what I get the following error below. I would
appreciate any insight, direction or help regarding this.
>
Thank-you!!
>
Walid
>
************************************************** ************************************************** ********************
Server Error in '/' Application.
------------------------
>
The IListSource does not contain any data sources.
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.Web.HttpException: The IListSource does not
contain any data sources.
>
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:
>
[HttpException (0x80004005): The IListSource does not contain any data
sources.]
System.Web.UI.DataSourceHelper.GetResolvedDataSour ce(Object
dataSource,
String dataMember) +376
System.Web.UI.WebControls.ListControl.OnDataBindin g(EventArgs e) +75
System.Web.UI.Control.DataBind() +26
T5DB.StartPage.Page_Load(Object sender, EventArgs e) +259
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +739
************************************************** **********
************************************************** **********
>
>


>>
>>
>>

The IListSource does not contain any data sources

After assigning a datasource to a grid, upon databind I get:

The IListSource does not contain any data sources

What in the world does that mean?IListSource is an interface that provides functionality to an object to return a list that can be bound to a datasource. A dataset for example implements this interface.

Did you databind your datagrid to a dataset obtained form a query to a database using ADO.NET ? Can you provide a snippet of code showing your commands to hook up the datasource and databind?
It was weird - I did the whole section again, code and controls and it worked. Thanks anyway!
I'm having this problem (The IListSource does not contain any data sources) and I don't know what could be wrong. If I test my SQL Query in SQL Analyzer, it does work fine. Now, when I run the query through my ASP.NET page, it sometimes work and others not, even though is the same query.

Dim connectionString As String = "Server='ServerName';User ID=username; Password=mypassword;database='databasename'"

Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)

'Set max num of rows
Dim strSQLMaxRecords as string
If intMaxRecords > 0 Then
strSQLMaxRecords = " TOP " & CStr(intMaxRecords) & " "
Else
strSQLMaxRecords = ""
End If

Dim queryString As String = _
"SELECT " & strSQLMaxRecords & _
" * " & _
" FROM dwidx.dbo.fsc_followup as TFUP" & _
" ,dwidx.dbo.patient_fsc_list as TPFL " & _
" ,dwidx.dbo.patient as TPAT " & _
" WHERE " & _
" (TPFL.id = TFUP.id)" & _
" AND (TFUP.id = TPAT.id)" & _
" AND (TPFL.fsc = TFUP.fsc)" & _
" AND (TPAT.oth_num IS NOT NULL)" & _
" AND (TPAT.del_dt IS NULL)" & _
" AND (TPAT.deact_dt IS NULL)" & _
" AND (TPAT.deceased_indicator IS NULL " & _
" OR TPAT.deceased_indicator = 'N') "

...
...
queryString = queryString & " " & m_strSql

Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection

'Add Parameters

Call AddSQLParameter("@.FSCNUM",intFscn,dbCommand)

'End Add Parameters

Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.SqlClient.SqlDataAdapter
dataAdapter.SelectCommand = dbCommand
Dim dataSet As System.Data.DataSet = New System.Data.DataSet

Try
lblQuery.Text = queryString
dataAdapter.Fill(dataSet)

'Catch SQLex As System.Data.SqlClient.SqlException
' lblFeedback.Text = "SQL Error: " & SQLex.Message & SQLex.Number & "<br />" & queryString
Catch ex as Exception
lblFeedback.Text = "Fatal error: " & ex.Message
End try

return dataSet

In the OnClick of my button...

DataGrid1.DataSource = GetFSCRecords(intFSCN _
, txtINNM.Text _
, txtINA1.Text _
, txtINA2.Text _
, txtINCTY.Text _
, txtINST.Text _
, txtINZIP.Text _
, txtEFF_DT.Text _
, txtEXP_DT.Text _
, intMaxRecords)

DataGrid1.DataBind() <<<< The error occurs here

Hi !

You can check thedataSet.Tables.Cout > 0 ThenreturndataSetelse return null;

I thinks the DataSet return have Count = 0 .Smile