472,958 Members | 2,331 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

Returning a DataTable blocks WCF-Service

Hello,

I recognized some days ago, that returning a DataTable blocks my
WCF-Service. Is this a known bug?
If I add this table to a new DataSet() and return this, it works.

Thank you,
Frank
Jun 27 '08 #1
5 8563
Hi Frank,

Yes, I agree that the problem is likely specific to something of the
components used here. Some simple DataTable/DataSet structure will not
quite repro the exact same behavior. Would you provide a sample class (used
to transfer in WCF method) that will cause such problem(even in a very
simply configured WCF service)? If the code is not convenient to paste on
web, you can email them as a solution to me so that I can test on my side.
You can reach me via the following email:

"stcheng" + @ + "microsoft.com"

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Date: Mon, 19 May 2008 08:14:07 +0200
From: Frank Hauptlorenz <ec***********@nospam.nospam>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Subject: Re: Returning a DataTable blocks WCF-Service

Hello Steven,

it blocks until the time-out occurs. I think it's also not related to
the data itsself, maybe it's related to the
data structure. You can also reference the next post in this newsgroup,
it's the same topic.

Best wishes,
Frank

Steven Cheng [MSFT] schrieb:
Hi Frank,

As for the DataTable transfer in WCF, there hasn't known issue for
generic
DataTable object. I think the problem you encounter is possibly a
specific
problem. Since DataTable will contains data values(from database),
sometimes it might raise some problem if the raw data in the DataTable
get
error when being serialized during the request/response.

Have you tried different kind of data records(in the datatable) to see
whether the problem only occurs when the datatable carry some particular
kind of data? Also, for the blocking behavior, is it means a block until
timeout or just make the response very slow?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you.
Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Jun 27 '08 #2
Dear Steven,

I've compiled a zip-archive with the server project and sent it to you
in some minutes.
Here are some hints:

The test method (operation contract) is this one:

public DataTable GetTestDataTableMethod()
{
DataTable tab = new
RECAROReportsMasterDataSet.ReportSettingsDataTable ();

return tab;
}

It just instantiates an EMPTY DataTable from an generated DataSet
(created with VS2008 and not manipulated).
The WCF-Connection times out after the return. You should be able to
read out all the WCF-Settings from the service project, or?
Thank you,
Frank
Steven Cheng [MSFT] schrieb:
Hi Frank,

Yes, I agree that the problem is likely specific to something of the
components used here. Some simple DataTable/DataSet structure will not
quite repro the exact same behavior. Would you provide a sample class (used
to transfer in WCF method) that will cause such problem(even in a very
simply configured WCF service)? If the code is not convenient to paste on
web, you can email them as a solution to me so that I can test on my side.
You can reach me via the following email:

"stcheng" + @ + "microsoft.com"

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Date: Mon, 19 May 2008 08:14:07 +0200
From: Frank Hauptlorenz <ec***********@nospam.nospam>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Subject: Re: Returning a DataTable blocks WCF-Service

Hello Steven,

it blocks until the time-out occurs. I think it's also not related to
the data itsself, maybe it's related to the
data structure. You can also reference the next post in this newsgroup,
it's the same topic.

Best wishes,
Frank

Steven Cheng [MSFT] schrieb:
>Hi Frank,

As for the DataTable transfer in WCF, there hasn't known issue for
generic
>DataTable object. I think the problem you encounter is possibly a
specific
>problem. Since DataTable will contains data values(from database),
sometimes it might raise some problem if the raw data in the DataTable
get
>error when being serialized during the request/response.

Have you tried different kind of data records(in the datatable) to see
whether the problem only occurs when the datatable carry some particular
kind of data? Also, for the blocking behavior, is it means a block until
timeout or just make the response very slow?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you.
Please
>feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

================================================= =
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/subscripti...ult.aspx#notif
>ications.
Jun 27 '08 #3
Hi Frank,

I've performed some tests according to your test solution. Yes, I've repro
the same behavior as you mentioned. Also, after some furter simplify and
isolation, the problem does be the DataTable type. Even if a very WCF
service method that return an empty DataTable will raise exception. I've
discussed with some other WCF engineers and found that there does exists
some problem with the WCF's serialization on DataTable if we return it
directly in WCF methods. Their suggestion now is that we try best to avoid
directly returning DataTable instance in WCF method, instead, we can
construct a Dataset object which contains the DataTable, and then return
the DataSet object instead. You can try this to see whether it helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.--------------------
Date: Wed, 21 May 2008 08:43:27 +0200
From: Frank Hauptlorenz <ec***********@nospam.nospam>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
Dear Steven,

I've compiled a zip-archive with the server project and sent it to you
in some minutes.
Here are some hints:

The test method (operation contract) is this one:

public DataTable GetTestDataTableMethod()
{
DataTable tab = new
RECAROReportsMasterDataSet.ReportSettingsDataTable ();

return tab;
}

It just instantiates an EMPTY DataTable from an generated DataSet
(created with VS2008 and not manipulated).
The WCF-Connection times out after the return. You should be able to
read out all the WCF-Settings from the service project, or?
Thank you,
Frank
Steven Cheng [MSFT] schrieb:
Hi Frank,

Yes, I agree that the problem is likely specific to something of the
components used here. Some simple DataTable/DataSet structure will not
quite repro the exact same behavior. Would you provide a sample class
(used
to transfer in WCF method) that will cause such problem(even in a very
simply configured WCF service)? If the code is not convenient to paste
on
web, you can email them as a solution to me so that I can test on my
side.
You can reach me via the following email:

"stcheng" + @ + "microsoft.com"

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you.
Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
>
--------------------
Date: Mon, 19 May 2008 08:14:07 +0200
From: Frank Hauptlorenz <ec***********@nospam.nospam>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Subject: Re: Returning a DataTable blocks WCF-Service

Hello Steven,

it blocks until the time-out occurs. I think it's also not related to
the data itsself, maybe it's related to the
data structure. You can also reference the next post in this newsgroup,
it's the same topic.

Best wishes,
Frank

Steven Cheng [MSFT] schrieb:
>Hi Frank,

As for the DataTable transfer in WCF, there hasn't known issue for
generic
>DataTable object. I think the problem you encounter is possibly a
specific
>problem. Since DataTable will contains data values(from database),
sometimes it might raise some problem if the raw data in the DataTable
get
>error when being serialized during the request/response.

Have you tried different kind of data records(in the datatable) to see
whether the problem only occurs when the datatable carry some particular
kind of data? Also, for the blocking behavior, is it means a block until
timeout or just make the response very slow?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
and
>suggestions about how we can improve the support we provide to you.
Please
>feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

================================================= =
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/subscripti...ult.aspx#notif
>
>ications.
Jun 27 '08 #4
Hello,

this is exactly my workaround I'm using (constructing an empty DataSet
and adding the table).
Will there be some changes in the WCF to support this in the future?

And besides: the WCF is a really great piece of software.

Best regards,
Frank
Steven Cheng [MSFT] schrieb:
Hi Frank,

I've performed some tests according to your test solution. Yes, I've repro
the same behavior as you mentioned. Also, after some furter simplify and
isolation, the problem does be the DataTable type. Even if a very WCF
service method that return an empty DataTable will raise exception. I've
discussed with some other WCF engineers and found that there does exists
some problem with the WCF's serialization on DataTable if we return it
directly in WCF methods. Their suggestion now is that we try best to avoid
directly returning DataTable instance in WCF method, instead, we can
construct a Dataset object which contains the DataTable, and then return
the DataSet object instead. You can try this to see whether it helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.--------------------
Date: Wed, 21 May 2008 08:43:27 +0200
From: Frank Hauptlorenz <ec***********@nospam.nospam>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
Dear Steven,

I've compiled a zip-archive with the server project and sent it to you
in some minutes.
Here are some hints:

The test method (operation contract) is this one:

public DataTable GetTestDataTableMethod()
{
DataTable tab = new
RECAROReportsMasterDataSet.ReportSettingsDataTable ();

return tab;
}

It just instantiates an EMPTY DataTable from an generated DataSet
(created with VS2008 and not manipulated).
The WCF-Connection times out after the return. You should be able to
read out all the WCF-Settings from the service project, or?
Thank you,
Frank
Steven Cheng [MSFT] schrieb:
>Hi Frank,

Yes, I agree that the problem is likely specific to something of the
components used here. Some simple DataTable/DataSet structure will not
quite repro the exact same behavior. Would you provide a sample class
(used
>to transfer in WCF method) that will cause such problem(even in a very
simply configured WCF service)? If the code is not convenient to paste
on
>web, you can email them as a solution to me so that I can test on my
side.
>You can reach me via the following email:

"stcheng" + @ + "microsoft.com"

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you.
Please
>feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

================================================= =
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/subscripti...ult.aspx#notif
>ications.

================================================= =
This posting is provided "AS IS" with no warranties, and confers no
rights.
>--------------------
Date: Mon, 19 May 2008 08:14:07 +0200
From: Frank Hauptlorenz <ec***********@nospam.nospam>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Subject: Re: Returning a DataTable blocks WCF-Service

Hello Steven,

it blocks until the time-out occurs. I think it's also not related to
the data itsself, maybe it's related to the
data structure. You can also reference the next post in this newsgroup,
it's the same topic.

Best wishes,
Frank

Steven Cheng [MSFT] schrieb:

>>Hi Frank,

As for the DataTable transfer in WCF, there hasn't known issue for

generic

>>DataTable object. I think the problem you encounter is possibly a

specific

>>problem. Since DataTable will contains data values(from database),
sometimes it might raise some problem if the raw data in the DataTable

get

>>error when being serialized during the request/response.

Have you tried different kind of data records(in the datatable) to see
whether the problem only occurs when the datatable carry some particular
kind of data? Also, for the blocking behavior, is it means a block until
timeout or just make the response very slow?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
and
>>suggestions about how we can improve the support we provide to you.

Please

>>feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

================================================ ==
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
>>
>>ications.


Jun 27 '08 #5
Thanks for your reply Frank,

Yes, I agree with you that WCF is one of the greatest feature involved in
the new .NET framework components. Actually I think its programming model
is quite clear and unified. That make it much easier to understand and use
comparing to many other existing distributed computing component such as
.net remoting , webservice.

Anyway, for this issue, I think the dev team has also noticed this since
I've also found some information of this issue from some MS engineer's
blog. I would also suggest you submit it to the connect feedback site since
the dev team will constantly monitor the issues and feedback there so as to
consider features for future improvement.

#Visual Studio and .NET Framework - English
http://connect.microsoft.com/feedbac...spx?SiteID=210

Thanks again for your posting.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Date: Mon, 26 May 2008 12:51:30 +0200
From: Frank Hauptlorenz <ec***********@nospam.nospam>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Subject: Re: Returning a DataTable blocks WCF-Service
Hello,

this is exactly my workaround I'm using (constructing an empty DataSet
and adding the table).
Will there be some changes in the WCF to support this in the future?

And besides: the WCF is a really great piece of software.

Best regards,
Frank
Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bubby | last post by:
Should I be concerned about the classic "Deep/Shallow" copy problem when returning objects, specifically a DataTable or DataView from a method? For example, see the code below: private...
6
by: Young J. Putt | last post by:
I've got a list box bound to a Datatable, like this: lstProjects.DataSource = m_oProjectSet.DataTable lstProjects.DisplayMember = "ProjectDesc" lstProjects.ValueMember = "ProjectID" I want to...
0
by: Maart_newbie | last post by:
Hi all, I've got a question about returning the value of a pk-column to a DataTable after inserting a row (via a data-adapter) using MySql5. Here is the SQL and code concerned: ...
4
by: SteveW | last post by:
Now that vista and the 3.0 framework are gold, I'm a bit confused, so any clarification would be very helpful. The 3.0 framework is gold and is downloadable etc. What is not 'gold' and...
7
by: =?Utf-8?B?TW9iaWxlTWFu?= | last post by:
Hello everyone: I am looking for everyone's thoughts on moving large amounts (actually, not very large, but large enough that I'm throwing exceptions using the default configurations). We're...
3
by: Ronald S. Cook | last post by:
Thanks for reading this. I've successfully implemented a WCF solution. However, even though I designate the return type to be DataTable in my class on the server (hosted under IIS), it comes...
1
by: John Cosmas | last post by:
I need an example of a project where by WCF Host passes a known DATATABLE to the CLIENT. Can someone please do me a big favor. The examples posted by MSFT is just too basic and passes simple...
10
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I'm using this coding to get 2 resultsets thru datareader and then load them into 2 datatables and bind the datatables to datagridviews. But sdrGrid.NextResult() is returning false for some...
9
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I've got a routine that builds a table using different queries, different SQL Tables, and adding custom fields. It takes a while to run (20 - 45 seconds) so I wrote a thread to handle the table...
11
by: John Dann | last post by:
Is there a concise/efficient way to retrieve blocks of rows from a datatable with VB2005? I've got a datatable (let's call it AllData), constructed programmatically, that contains a lot of...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.