473,503 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8612
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
2684
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
2225
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
1760
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
1464
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
10803
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
2537
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
6427
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
2057
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
6951
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
4613
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
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.