Click here to Skip to main content
15,908,264 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please bare with me; I am a pretty experienced C# programmer, but I do not have any experience with ASP.NET. I am not asking for a full solution here, just some guidance in terms of where to start.

Here's what I want to do: I have an application which runs on client machines. In certain situations, I want to make that application be able to send a request to a server, where another .NET application is hosted. When the server receives this message (along with parameters), the server executes the .NET program and returns the result to the client, where the client application is able to receive it and behave accordingly.

I hope this question is not too general for someone to point me in the right direction...
Posted
Comments
_Asif_ 6-Mar-14 11:49am    
You have mentioned ASP.Net Which part you think would be in ASP.Net and why?

One of the approach could be like this

At Server End:
Build a socket/named pipe based Asynchronous Windows Service. This application will load the executable, wait for the result from the executable and return the response back to the client application.

The challenges here that you need to handle is following
* Designing Windows Service is itself a challenge
* Multithreading is not as easy as we think
* Communication Error Handling.
* creating process to execute the other application and gets result from it


At Client End:
Build a simple socket client application which send request to the server and wait for the response and do things accordingly.

Since its a two way communication that's why a communication based applications is suggested otherwise the same could be achieve using Web Service at server end.
 
Share this answer
 
Some years ago i created a solution for same situation.
I created a TCPClient based program that was running as a server app. it was a simple tcp client that was listening some given ports. when any client connects it can send receive data through an other tcpClient. on client side machine, there was a tcp client as user. that initiated a connection request on specific port. it gets connection string and then communicate on that specific port.

You may need to study TCPClient class in .Net.
That solution was written in C#.Net.
It was a multi threaded app at server side.
After connect, each client was handled in different thread. specifically own listening thread.
 
Share this answer
 
Go for Web Services[^].
See this as well @ MSDN[^]

Two types of services are there in .NET
1.) ASMX[^]
2.) WCF[^]

you may find the difference between these two here[^].

-KR
 
Share this answer
 

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