Click here to Skip to main content
15,887,376 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hello All,
I have silverlight 4 web project with Silverlight enabled WCF services.
Once i host website my client can chat to other connected client using duplex method.
OperationContext.Current.GetCallbackChannel<);
this gives me list of all clients connected to server,

Now i was wondering is there any way to call server(host) directly from client instead of client- to client. Such as if new client is connected the main server will get windows pop-up message saying new client connected to server( the server i meant is the computer where this web project was hosted and created) client are the one who are using the website using website path (URL).

In better way i would say i need something similar to Router Setup, Let's say you bought new router and then you go on website and change settings and updates them from website and it updates settings in router i need exact same methodology for this project.
Regards,
Mohit.
Posted
Updated 14-Jul-11 9:30am
v2
Comments
Mark Salsbery 13-Jul-11 18:08pm    
There's no client to client communication in Silverlight duplex service. It's all between a client and the server. The client can call the server any time using any of the client-accessible service methods.

The only problem I see is doing a popup on the server. That's only going to work if you host the service(s) in a process that has a UI. Won't work hosted in IIS process or a Windows Service process, unless you have another app running that communicates with the host process using some IPC method.
mohit`12 14-Jul-11 10:30am    
i got your point. thanks so what i think i can do is Host service with some kind of GUI that will be run whenever you host the service and whenever a client makes a call to server that GUI will send message to Windows ( that's server) and yes i meant i was doing client to client communication using server so server gets message then looks for client and forwards message to other client but i guess i do not need that anymore. so i was wondering how would i know when client calls the service i meant in GUI is there any method that informs you if client made call.

Thanks
Mark Salsbery 14-Jul-11 18:17pm    
A service method gets called on the server whenever a client calls it, and you're the one that writes the service methods, so you have the code right there to do anything you want to when the client makes a call.
mohit`12 15-Jul-11 13:30pm    
Okay i Got that part working now i have another problem that is whenever client calls service i need to read data from client's page(textboxes) and store them on server side as text file or xml file is that possible. because i beleive isolatestorage is for client side that is not gonna work for me , i tried filestream that doesn't work so is there anyway to create file and write data into it in silverlight serverside.

thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900