What's the best way to retrive xml from a remote class?
Here's my situation. All the servers are running Win2003. There's a
web server on Public. There's a sql server on Campus. The only access
we have to Campus is through Secure.
-----------------
| Campus |
-----------------
|
-----------------
| Secure |
-----------------
|
-----------------
| Public |
-----------------
Somebody pointed me to a msdn article
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/dnnetsec/html/SecNetHT15.asp
And I've got that up and running. Right now, I can access the remote
class on Secure through a web service running on Secure. Our net nazi
won't let us put a web server on Secure.
What we want is the user to enter in a few variables on a form on
Public's webserver, send the variables to Secure, have the remote object
on Secure query the database on Campus and then send the data back to
the Public.
What's the best way? Can I pass a dataset?
Ken Kolda - 16 Nov 2004 19:47 GMT
Is it a web service that's running on Secure or a Windows Service that's
running and hosting a remoted object? A .NET web service generally runs
under IIS but you indicated that Secure doesn't have a web server (plus, the
article you posted is about creating a Windows Service, not a Web Service).
If you're using a Windows Service to host an object using remoting, then
passing a DataSet from the service to the client is certainly acceptable.
Your remote object would look something like:
public class RemoteObject : MarshalByRefObject
{
public DataSet GetSomeData(int someParam, string anotherParam)
{
// Get the data from the database and return the data set
}
}
The main issue you have to watch out for is that the DataSet is fairly
inefficient when it comes to being serialized/deserialized, so if you're
passing large amounts of data or making lots of calls, you may want to
consider either an alternate representation or one of the pieces of code out
there to improve the performance of the DataSet:
http://objectsharp.com/Blogs/datasetfaq/archive/2004/06/10/614.aspx
Ken
> What's the best way to retrive xml from a remote class?
>
[quoted text clipped - 29 lines]
>
> What's the best way? Can I pass a dataset?