locked
getting importstatus to signalr progressbar RRS feed

  • Question

  • User-1121540557 posted

    Hi,

    I have a MVC 5 application (mainProject), and a classlibrary Import.

    Now I have a refrence from my mainProject to my Import project (Using Import; in mainProject).

    in my mainProject I have a Import page to import excel files.

    I want to show the current status of the import, how can I send this data to my signalr progress from my Import project without causing a cross reference?

    Best regards,

    Mark

    Thursday, August 23, 2018 6:55 PM

Answers

  • User-1121540557 posted

    Thanks for your reply Brando,

    Why jquery progressbar when I'm using signalr?

    And I have a external import library project wich is referenced in mijn main project, from this import project I need to return te status of the import to my progressbar.

    So it makes no sence in what your saying...(Maybe I misunderstanding you?)

    I already figured kt out myself.

    Here is how.

    I've made:

    1. external signalr hub (project library class)
    2. external Import project
    3. Mainproject

    Mainproject is referenced to the Hub project

    And Import project is also referenced to Hub project

    when I Execute the import project from the main project I send a UserId and a Connection Id with (This will also be send to the Hub project from the mainproject)

    when the status of the import changes the import will send this to the hub(with userId and connectionId) signalr hub will send it back to the requestor(In this case the page from where the import is executed)

    Here 's some deeper info about this topic.

    https://forums.asp.net/post/6163748.aspx (This braught me to the result..)

    https://github.com/garethrbrown/aspnet-signalr-upload-progress-bar

    https://docs.microsoft.com/en-us/aspnet/signalr/overview/guide-to-the-api/hubs-api-guide-server

    Beste regards,

    Mark

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, August 25, 2018 3:11 PM

All replies

  • User283571144 posted

    Hi Clubict,

    I want to show the current status of the import, how can I send this data to my signalr progress from my Import project without causing a cross reference?

    According to your description, I suggest you could consider using jquery ui progress bar to achieve your requirement.

    You could firstly create a hub inside the main project and you could write the method to get the current import complete percent.

    Then you could write the js inside client-side to receive current status.

    More details, you could refer to below article:

    https://www.codeproject.com/Articles/1124691/SignalR-Progress-Bar-Simple-Example-Sending-Live-D 

    Best Regards,

    Brando

    Friday, August 24, 2018 6:37 AM
  • User-1121540557 posted

    Thanks for your reply Brando,

    Why jquery progressbar when I'm using signalr?

    And I have a external import library project wich is referenced in mijn main project, from this import project I need to return te status of the import to my progressbar.

    So it makes no sence in what your saying...(Maybe I misunderstanding you?)

    I already figured kt out myself.

    Here is how.

    I've made:

    1. external signalr hub (project library class)
    2. external Import project
    3. Mainproject

    Mainproject is referenced to the Hub project

    And Import project is also referenced to Hub project

    when I Execute the import project from the main project I send a UserId and a Connection Id with (This will also be send to the Hub project from the mainproject)

    when the status of the import changes the import will send this to the hub(with userId and connectionId) signalr hub will send it back to the requestor(In this case the page from where the import is executed)

    Here 's some deeper info about this topic.

    https://forums.asp.net/post/6163748.aspx (This braught me to the result..)

    https://github.com/garethrbrown/aspnet-signalr-upload-progress-bar

    https://docs.microsoft.com/en-us/aspnet/signalr/overview/guide-to-the-api/hubs-api-guide-server

    Beste regards,

    Mark

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, August 25, 2018 3:11 PM