Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

126
Vistas
Show data that is obtained from command line process in ASP.NET MVC

In c# wpf, I can add command-line-based apps to my app and send input and show the output in a richtextbox using System.Diagnostics. Now I wanna implement this in ASP.NET MVC.

I know how to send data from javascript to a controller using ajax and the controller does some processing and returns a result and shows it in view. but the thing is, the data from that process is receiving asynchronously by an event like this:

private void SortOutputHandler(object sendingProcess, DataReceivedEventArgs outLine)
{
  // For each line that is printed in the console, this event will be executed and the 
  // text from that line can be received by outLine.data
}

What I'm trying to do is add this received text (outline.data) to a paragraph in view asynchronously. Ajax only works if I wanted to run an ActionResult method and wait for my response and after all of the lines are received, then it will send the result back to javascript. But I want to show every received line exactly the moment it arrived in view. How can I do it?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Using SignalR solved my issue. With that library, I could call an asp.net function and send data in javascript and vice versa. to recognize every client, I stored their connection id to send the result back to them when it's ready.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda