Re: Returning typed DataRow from WebMethod



Hi BeanDog,

This is my first post to the managed MSDN groups, but it seems like you're
experiencing similar issues to this KB.
http://support.microsoft.com/default.aspx?scid=kb;en-us;815251

Maybe this will help point you in the right direction.



--
JASON

"BeanDog" <BeanDog@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4B3F68DF-0B67-4540-9230-A61AE42FBD07@xxxxxxxxxxxxxxxx
The title pretty much says it. I'm using the tutorial on MSDN for
creating a
3-tiered distributed application
(http://msdn2.microsoft.com/en-us/library/aa581776.aspx), a great tutorial
by
the way.

So I've created a typed dataset from my database (a table called
Function),
and written the following function:

[WebMethod]
public CodeSense.FunctionRow HelloWorld() {
CodeSenseTableAdapters.FunctionTableAdapter t = new
CodeSenseTableAdapters.FunctionTableAdapter();
CodeSense.FunctionDataTable dt = t.GetData();

return dt[0];
}

This compiles fine, but the WSDL page is a runtime error saying my
FunctionRow can't be serialized.

I'm doing investigative work to see how I would put together a distributed
3-tiered web application designed for very heavy load (several hundred web
hits per second). Basically, the conclusion I came to was that I should
set
up a SQL server of some sort as the data backend, then have an ASP.NET
business layer doing all the business logic, then have the business layer
expose itself to the presentation layer through either SOAP services or
.NET
remoting. The presentation layer, business layer, and database layer
would
each be separately load-balanced across several production servers.

These strongly-typed TableAdapters and related classes were a huge bonus
for
me, since that means we won't have to create and keep up business objects
in
C# that simply mirror our database schema. And .NET's great support for
SOAP
serialization would make passing these to our non-.NET presentation tier a
trivial matter.

Unfortunately, it looks like this fantastic feature
(automatically-generated
strongly-typed DataRows) is going to be basically unusable since I can't
pass
these objects from my business tier to my presentation tier. That is, I
can't return them through either .NET remoting or .NET WebServices.

What's the preferred method for passing strongly-typed DataRows from a
business-logic tier to a presentation tier running on a physically
separate
server?


.



Relevant Pages

  • Re: Returning typed DataRow from WebMethod
    ... So I've created a typed dataset from my database (a table called ... business layer doing all the business logic, ... these objects from my business tier to my presentation tier. ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Best practice for multi tier apps?
    ... autogenerated table adapters. ... "Deploying Business Entities" ... business layer. ... The DataLayer is used/consumed by the BusinessLayer. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Exposing Business Layer Objects to Presentation Layer
    ... Why exposing business objects to the ... > of the business layer logic is intrinsic to the business layer itself. ... I was wondering if the Builder pattern or the AbstactFactory ... Abstract Factory wrapped by a Facade may solve that. ...
    (comp.lang.java.programmer)
  • Re: Designing .NET applications
    ... > Imagine, you develop an object-oriented application, and business ... > are in a server for two reasons: ... Web services should never be a thin layer over the DB, ... >>> same client or business layer is running in the server, ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Exposing Business Layer Objects to Presentation Layer
    ... Why exposing business objects to the ... > of the business layer logic is intrinsic to the business layer itself. ... I was wondering if the Builder pattern or the AbstactFactory ... Abstract Factory wrapped by a Facade may solve that. ...
    (comp.object)

Loading