windows service for downloadinf files from serwer

  • Thread starter Thread starter mamin
  • Start date Start date
M

mamin

Hi,
I'm trying to write windows service that sending files from server to
client. This service will work on serwer side.How windows service on
server side can get client address? Is it possible to realize it?
 
mamin,

It depends on the technology you are using. Some technologies will
allow you to gather the ip address of the client from your underlying
connection.

However, why not just have the client, when it connects to you give you
that information?

Of course, if the client connects to you, you can always just send the
file over that connection, you should't need to know the specific address
because you already have a connection.

Hope this helps.
 
The client visiting by web page (asp.net page) and there he giving the
order to send him some files.It will be writing to database and then my
windows service should start to send this files to the client.So I need
to create new connection, but how can I get client address when I have
a connection with him (while he is connecting by asp.net page)
 
mamin,

You can't do this through ASP by default. You will not be able to
establish a connection back to the client as the default user for ASP
(ASPNET) doesn't have access to the network.

Even if you could, the client would have to have special software
installed on their side to open up the socket, and interpret the data you
are going to send to them.

You can get the IP address from the headers in the request.

Why not send the files through the HTTP Response, though?
 
Back
Top