473,749 Members | 2,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Client - server communication

Hi!

Does anyone know if it is possible for a client server communication
easy in .NET with these requirements:

The client always initiates the communication
The server only answers (responds)
Uses port 80, skips firewall
The server computer doesn't have a IIS or web server

I have thought about remoting but it feels a little bit over the top, we
are only sending information to the client .

/Christian
Nov 16 '05 #1
4 9325
Remoting is a good answer. Use the Http Channel. Very easy to code,
only about 5 lines on client and server.

Another option is to use System.IO and setup some UDP or TCP sockets.
This is also quite easy.

If you need some code examples mail me.

Christian Westerlund wrote:
Hi!

Does anyone know if it is possible for a client server communication
easy in .NET with these requirements:

The client always initiates the communication
The server only answers (responds)
Uses port 80, skips firewall
The server computer doesn't have a IIS or web server

I have thought about remoting but it feels a little bit over the top, we
are only sending information to the client .

/Christian

Nov 16 '05 #2
Elp

"Arran Pearce" <arranpearce@NO _SPAMcellhire.c om> wrote in message
news:uv******** *****@tk2msftng p13.phx.gbl...
Remoting is a good answer. Use the Http Channel. Very easy to code,
only about 5 lines on client and server.

Another option is to use System.IO and setup some UDP or TCP sockets.
This is also quite easy.


And another option would be to use a Web Service with WSE 2.0 (now in
release version) which allows to host a Web Service within a Windows
executable without the need of a Web Server.Here is a link to a good article
that explains that, unfortunately in French:
http://www.c2i.fr/code.aspx?IDCode=576
You can find information in English here:
http://msdn.microsoft.com/webservices/building/wse/ (the feature i'm talking
about is Web Service Messaging)

I guess however that the Remoting way with HTTP channel would be much easier
and more powerfull although not interroperable (but i'm not sure if WSE 2 is
that much interroperable either)
Nov 16 '05 #3
Hi Elp!

Thanks for the tip, I'll look into that!

/Christian

Elp wrote:
"Arran Pearce" <arranpearce@NO _SPAMcellhire.c om> wrote in message
news:uv******** *****@tk2msftng p13.phx.gbl...
Remoting is a good answer. Use the Http Channel. Very easy to code,
only about 5 lines on client and server.

Another option is to use System.IO and setup some UDP or TCP sockets.
This is also quite easy.

And another option would be to use a Web Service with WSE 2.0 (now in
release version) which allows to host a Web Service within a Windows
executable without the need of a Web Server.Here is a link to a good article
that explains that, unfortunately in French:
http://www.c2i.fr/code.aspx?IDCode=576
You can find information in English here:
http://msdn.microsoft.com/webservices/building/wse/ (the feature i'm talking
about is Web Service Messaging)

I guess however that the Remoting way with HTTP channel would be much easier
and more powerfull although not interroperable (but i'm not sure if WSE 2 is
that much interroperable either)

Nov 16 '05 #4
On the server is call:
HttpChannel chan = new HttpChannel(454 4);
ChannelServices .RegisterChanne l(chan);

Type myObjectType = typeof(myObject );

RemotingConfigu ration.Register WellKnownServic eType(myObjectT ype,"EndPointNa me",
WellKnownObject Mode.SingleCall );

and on the Client Call:

HttpChannel chan = new HttpChannel(0);
ChannelServices .RegisterChanne l(chan);
myObjectInterfa ce r =
(myObjectInterf ace)RemotingSer vices.Connect(t ypeof(myObjectI nterface),"http ://localhost:4544/EndPointName");
My Client app has a Class which is the interface of the object i am
sharing and the server app has the full object class.
I normally have the client using a interface rather than the full class
so if i change the internals of the class then i dont need to
redistribute the client.
Beeeeeeeeeeeeve s wrote:
Wouldn't mind seeing some of your examples of using remoting to do simple communication between client and server if you have any.

Also would be interested in seeing ones of a service communicating with a front end app on the same machine.

mail me to benjtaylor at hotpop dot com if you have any good examples

"Arran Pearce" wrote:

Remoting is a good answer. Use the Http Channel. Very easy to code,
only about 5 lines on client and server.

Another option is to use System.IO and setup some UDP or TCP sockets.
This is also quite easy.

If you need some code examples mail me.

Christian Westerlund wrote:

Hi!

Does anyone know if it is possible for a client server communication
easy in .NET with these requirements:

The client always initiates the communication
The server only answers (responds)
Uses port 80, skips firewall
The server computer doesn't have a IIS or web server

I have thought about remoting but it feels a little bit over the top, we
are only sending information to the client .

/Christian

Nov 16 '05 #5

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

Similar topics

0
3030
by: Offer | last post by:
Hi, I create a TCP connection between client & server and I need to send vectors via ObjectInputStreams back and forth (the client initiates the protocol). The connection is established successfully, the client sends its first request and the server responds accordingly, the client receives the response and tries to send another request (the request Vector is created successfully) but something is wrong... The following line (located in a...
1
1249
by: JB | last post by:
All, I am reaching out looking for the best way to approach a problem given by my company. We are embarking on our first .NET application, and quite frankly we are not as educated with the Framework as we probably should be. The question is what is the best method of communication protocol? Situation: We have a three tiered application. one DB server, one Software server, and many Software Clients. The DB and software servers will be...
1
1350
by: Chris LaJoie | last post by:
Hi, I'm tyring to impliment a client-server application which communicates through ASP.NET. I currently have this same sort of system working with a VB6 program and standard 'old' ASP. Our current program uses a component called ASPTear to aid in building a POST and sending it up to the site. The website returns the results of the POST (either 'success' or an error message). Is it possible to impliment this type of system using the...
1
1973
by: Alhazred | last post by:
I'm writing a client-server software which should emulate an email service on a local machine. I'm now at the beginning and I'm trying to let communicate the client and the server process, but have a problem with GetMailslotInfo() in the server process inside the main() which returns with error code 1 which means "Invalid Function" though it looks correct to me. Can you understand why does that happen? You can see the code here:...
6
3049
by: Matt Nunnally | last post by:
I'm trying to build a client for a third party application that resides on the server and accepts SSL communication. i'm using this code: tcpClient.Connect(m_IPAddress, m_Port) Dim sslStream As New SslStream(tcpClient.GetStream, False, New Net.Security.RemoteCertificateValidationCallback(AddressOf ValidateServerCertificate)) sslStream.AuthenticateAsClient(m_IPAddress) If sslStream.CanWrite And...
1
1558
by: stmfc | last post by:
in a server client communication which uses Socket and ServerSocket classes of java, think that client is sending some information byte by byte, and server is reading in the same way (byte by byte), then replies. what i cannot figure out is: when does the server start reading the bytes which are sent by client. does it wait until all bytes arrived? or does it immediately read when 1 byte is written to the related port. or does this...
5
1295
by: madankarmukta | last post by:
HI, Can anybody tell me the link from where i can find how trhe interaction betwenn the server and client takes place..including the point 1)Listeing port for both i.e. server is listening on port p1 and client on port p2. 2)How the coomunication proceeds when the client send the request to server 3) what if the any of the listening ports of the client or server are not responding then how the communication proceeds. I had a little...
5
3176
by: AeonOfTime | last post by:
Let's assume a web application (in this case a browser-based game) with a custom HTTP server built on PHP, and a client also built on PHP. The client uses the server to access and change data. Even if the client server communication is not directly visible to the user (who logs into the client), the fact that the server is publicly accessible (a port sniffer would be enough to find it) means the communication has to be secured. How...
0
1304
by: bushramemon | last post by:
hello,,now i m working on multi-threaded client server socket program in which there is one server and multiple clients.........these both are just giving acknowledge to each other that server started and client 1 started ,client 2 started but these programs are not communicating with each other,,means i want proper communication between both,,what should i do????also i want to know how to do this using udp protocol? server program is ...
0
8996
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9388
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8256
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.