473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Remoting (but need a binary data transfer)

Hi all,
I'm creating client/server app in C# (VS. 2003).
So, I need the client to call the server with some auth info (user and
pass).
If the auth is OK, server will do some work and will prepare a zip-file
and some other text and numeric data and will notify the client that
everything is ready.
And the client will fetch the data.

So if it was all console/desktop application, I know what to do (in
basic):

//server
class MyWorkClass
{
public string sRetData;
public int nRetData;
public byte[] aRetData;

public event I_AM_ready .... //
public bool Connect(string username, string pass)
{
if CheckAuth(username, pass)
{
DoTheWork();
sRetData = "HERE IS THE DATA";
nRetData = 1001; //just as example
aRetData = new byte[1000000];
aRetData = ...//fill it with data from the file
return true;
}
else return false;
}

private void DoTheWork()
{ ...
fire some events to show progress ... }

private bool CheckAuth(string u, string p)
{ ... }
}
//client
MyWorkClass myServer = new MyWorkClass();
// subscribe event handler
myServer.I_AM_Ready += ....
if (myServer.Connect(myname, mypass))
// do something with the data

So, can I use all these samples (tutorials, etc.for remoting) to do such
a thing? Is there a problem with the array?
Will it prepare a XML tag for every byte from the array (then the
traffic will be HUGE, and I want to avoid this)?

Also, I didn't find any info about what is happening at the server side,
is it creating a new instance of the class for every client, or there is
only one (like static) copy?
Thank you very very much for reading all this. I'd highly appreciate
every single suggestion, explanation, example, etc.

Thanks again
Sunny
Nov 15 '05 #1
3 2259

Hi Sunny,

Thank you for posting in this group.

You can fulfill you work with .Net Remoting.
In the server side, there are 3 ways of creating object for your request:
1.server side activation----singlecall
Create object instance for every request
2.server side activation----singleton
Create only one instance for all the request.
3.client side activaction
Create only one instance for the same client request

You can select different server side creation deside by your program logic.

Hope this helps

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: Sunny <su******@icebergwireless.com>
| Subject: Remoting (but need a binary data transfer)
| Date: Tue, 16 Sep 2003 15:50:28 -0500
| Message-ID: <MP************************@msnews.microsoft.com >
| Organization: Iceberg Wireless LLC
| MIME-Version: 1.0
| Content-Type: text/plain; charset="iso-8859-15"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: MicroPlanet Gravity v2.60
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: 216.17.90.91
| Lines: 1
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.csharp:184665
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi all,
| I'm creating client/server app in C# (VS. 2003).
| So, I need the client to call the server with some auth info (user and
| pass).
| If the auth is OK, server will do some work and will prepare a zip-file
| and some other text and numeric data and will notify the client that
| everything is ready.
| And the client will fetch the data.
|
| So if it was all console/desktop application, I know what to do (in
| basic):
|
| //server
| class MyWorkClass
| {
| public string sRetData;
| public int nRetData;
| public byte[] aRetData;
|
| public event I_AM_ready .... //
| public bool Connect(string username, string pass)
| {
| if CheckAuth(username, pass)
| {
| DoTheWork();
| sRetData = "HERE IS THE DATA";
| nRetData = 1001; //just as example
| aRetData = new byte[1000000];
| aRetData = ...//fill it with data from the file
| return true;
| }
| else return false;
| }
|
| private void DoTheWork()
| { ...
| fire some events to show progress ... }
|
| private bool CheckAuth(string u, string p)
| { ... }
| }
|
|
| //client
|
|
| MyWorkClass myServer = new MyWorkClass();
| // subscribe event handler
| myServer.I_AM_Ready += ....
| if (myServer.Connect(myname, mypass))
| // do something with the data
|
|
|
| So, can I use all these samples (tutorials, etc.for remoting) to do such
| a thing? Is there a problem with the array?
| Will it prepare a XML tag for every byte from the array (then the
| traffic will be HUGE, and I want to avoid this)?
|
| Also, I didn't find any info about what is happening at the server side,
| is it creating a new instance of the class for every client, or there is
| only one (like static) copy?
|
|
| Thank you very very much for reading all this. I'd highly appreciate
| every single suggestion, explanation, example, etc.
|
| Thanks again
| Sunny
|

Nov 15 '05 #2
Hi Jeffrey,
Thanks a lot for the answer.
I still have no answer on the question about how the binary data is
transmitted (I.e. for sure it is some kind of XML), but it is important
for me to know how exactly look like the the binary stream, because I
have to transmit something like byte[300000], and ...

Thanks
Sunny
In article <HW**************@cpmsftngxa06.phx.gbl>, v-
je***@online.microsoft.com says...

Hi Sunny,

Thank you for posting in this group.

You can fulfill you work with .Net Remoting.
In the server side, there are 3 ways of creating object for your request:
1.server side activation----singlecall
Create object instance for every request
2.server side activation----singleton
Create only one instance for all the request.
3.client side activaction
Create only one instance for the same client request

You can select different server side creation deside by your program logic.

Hope this helps

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: Sunny <su******@icebergwireless.com>
| Subject: Remoting (but need a binary data transfer)
| Date: Tue, 16 Sep 2003 15:50:28 -0500
| So, can I use all these samples (tutorials, etc.for remoting) to do such
| a thing? Is there a problem with the array?
| Will it prepare a XML tag for every byte from the array (then the
| traffic will be HUGE, and I want to avoid this)?

Nov 15 '05 #3

Hi Sunny,

Do you use Marshal by reference or by value?
I think you should use tcp protocol and binary serialization this object,
then
you performance will be better.
The HTTP will use the SOAP serialization.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: Sunny <su******@icebergwireless.com>
| Subject: RE: Remoting (but need a binary data transfer)
| Date: Wed, 17 Sep 2003 09:13:19 -0500
| Message-ID: <MP************************@msnews.microsoft.com >
| References: <MP************************@msnews.microsoft.com >
<HW**************@cpmsftngxa06.phx.gbl>
| Organization: Iceberg Wireless LLC
| MIME-Version: 1.0
| Content-Type: text/plain; charset="iso-8859-15"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: MicroPlanet Gravity v2.60
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: 216.17.90.91
| Lines: 1
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:185502
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi Jeffrey,
| Thanks a lot for the answer.
| I still have no answer on the question about how the binary data is
| transmitted (I.e. for sure it is some kind of XML), but it is important
| for me to know how exactly look like the the binary stream, because I
| have to transmit something like byte[300000], and ...
|
| Thanks
| Sunny
|
|
| In article <HW**************@cpmsftngxa06.phx.gbl>, v-
| je***@online.microsoft.com says...
| >
| > Hi Sunny,
| >
| > Thank you for posting in this group.
| >
| > You can fulfill you work with .Net Remoting.
| > In the server side, there are 3 ways of creating object for your
request:
| > 1.server side activation----singlecall
| > Create object instance for every request
| > 2.server side activation----singleton
| > Create only one instance for all the request.
| > 3.client side activaction
| > Create only one instance for the same client request
| >
| > You can select different server side creation deside by your program
logic.
| >
| > Hope this helps
| >
| > Best regards,
| > Jeffrey Tan
| > Microsoft Online Partner Support
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
|
|
|
| > --------------------
| > | From: Sunny <su******@icebergwireless.com>
| > | Subject: Remoting (but need a binary data transfer)
| > | Date: Tue, 16 Sep 2003 15:50:28 -0500
| > | So, can I use all these samples (tutorials, etc.for remoting) to do
such
| > | a thing? Is there a problem with the array?
| > | Will it prepare a XML tag for every byte from the array (then the
| > | traffic will be HUGE, and I want to avoid this)?
|

Nov 15 '05 #4

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

Similar topics

0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed...
6
by: Uttam | last post by:
Hello, We are at a very crucial decision making stage to select between .Net and Java. Our requirement is to download a class at runtime on the client computer and execute it using remoting or...
0
by: Mike Grishaber | last post by:
Hello All, I am using an IHttpAsyncHandler class to intercept HTTP Requests and forward them to a system which processes the Request and returns the Result. I use .NET Remoting to connect the...
11
by: ajou_king | last post by:
I was running some tests on my Win32 1GHZ processor to see how long it would take to transmit objects numerous times via TCP/IP using C# ..NET Remoting vs the C++ trustworthy method of binary...
5
by: Wendy Elizabeth | last post by:
I want a Visual Basic 6.0 web or desk top application to communicate with a Visual Basic.NET web or desktop application. I also want a Visual Basic.NET web or windows application to communicate...
13
by: Ron L | last post by:
I am working on an application that is a front-end for a SQL database. While it is not an immediate requirement, the application will probably be required to be able to connect via the internet at...
8
by: Raju Joseph | last post by:
Hi All, I am just trying to get an opinion here. I know this is always a tough choice to make. We are in the process of converting our VB6 based Healthcare Information System (a full-fledged...
0
by: tomaszh | last post by:
Hello, We are having a problem transfering large amounts of data ( > 3MB) over remoting. The problem only seems to occur when data is transfered from the client to server, as we have...
2
by: Ryan | last post by:
My apologies if this is not the forum to post questions regarding .NET Remoting, but I figured WebServices would be the most appropriate forum of the bunch. We're currently completely re-arching...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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,...

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.