Asked by:
using Windows services and progress bar in webapplication

Question
-
User-1399352090 posted
Hello,
i have webapplication, which multiple users can uploaded multiple large audio files and it will convert any to .mp3 and store in server.
currently in webpage i'm showing how much percentage files(multiple progress bars) has been uploaded.
but i want to convert multiple files using windows server and also i want to show the percentage of the conversion using signlar or any other suggested way.
my question are:
1) how can i convert multiple files aysnc way with out delay(previous que) multiple client requests/threads
2) how can i show conversion percentage of each file in website
can any one suggest me please.
Appreciate for Quick and Best Response
Tuesday, February 20, 2018 12:00 PM
All replies
-
User-284744251 posted
Instead of using windows service you can try Web Api with SignalR
Tuesday, February 20, 2018 4:42 PM -
User-1399352090 posted
I have tested with this way also, i'm using webapi for upload files to the server, but if want to convert files using web application then the problem will come on conversion mode. due to large files conversion the IIS Use Lots of memory and IIS server became slow and also the conversion process will take so longer.
using windows services i IIS will not have heavy load on it.
Wednesday, February 21, 2018 7:45 AM -
User-284744251 posted
You can host SignalR and WebAPI in windows service also
https://code.msdn.microsoft.com/windowsapps/SignalR-self-hosted-in-6ff7e6c3
http://www.c-sharpcorner.com/UploadFile/b1df45/web-api-self-hosting-using-windows-service/
Wednesday, February 21, 2018 6:30 PM -
User283571144 posted
Hi smd_yasin,
I have tested with this way also, i'm using webapi for upload files to the server, but if want to convert files using web application then the problem will come on conversion mode. due to large files conversion the IIS Use Lots of memory and IIS server became slow and also the conversion process will take so longer.
using windows services i IIS will not have heavy load on it.
As far as I know, one IIS application pool will not affect another IIS application pool.
It will use the server resource to convert the file no matter you choose windows service or IIS service.
In my opinion, I suggest you could consider use web api, because it is easily call and get the convert process value.
Besides, about how to use signlaR to show process bar, you could refer to below article.
https://www.codeproject.com/Articles/1124691/SignalR-Progress-Bar-Simple-Example-Sending-Live-D
Best Regards,
Brando
Thursday, February 22, 2018 9:39 AM -
User-1399352090 posted
Brando ZWZ
As far as I know, one IIS application pool will not affect another IIS application pool.
It will use the server resource to convert the file no matter you choose windows service or IIS service.
if i use console application then nothing much difference in my pc performance . but when i use IIS application then my browser became slow and hang. and pc also became very slow. do you really sure that IIS and console application and windows service will have same performance?
Brando ZWZ
In my opinion, I suggest you could consider use web api, because it is easily call and get the convert process value.
do you mean Web API Self-Hosting Using Windows Service?
Thursday, February 22, 2018 11:08 AM -
User283571144 posted
Hi smd_yasin,
if i use console application then nothing much difference in my pc performance . but when i use IIS application then my browser became slow and hang. and pc also became very slow. do you really sure that IIS and console application and windows service will have same performance?In my opinion, the IIS pipeline is more complex than the console pipeline, it may takes more server resources than the console application.
But IIS will manage the application well than the self-host application.
If converting the file is just called by your upload application, I suggest you could consider self-host.
Best Regards,
Brando
Monday, February 26, 2018 2:45 AM