Answered by:
Runnig a console application from asp.net mvc in azure

Question
-
I am new to azure. I am developing an MVC 5 application which has a long running process. The process may take more than one hour to execute completely. So there is a console application which can be start from MVC controller and in UI user can do other works while console run in background. My main problem is how to deploy console application in azure by using git with visual studio online. I am using System.Diagnostics.Process class for starting the console. So my main problem is to deploy the console app by git and invoke it from web.
Please help me regarding this.
- Moved by Charles-LiModerator Friday, July 4, 2014 2:01 AM
- Moved by Jim CheshireMicrosoft employee Tuesday, August 19, 2014 7:23 PM
Thursday, July 3, 2014 11:57 AM
Answers
-
Did you checkout Windows Azure WebJobs? This is a feature related to Azure Websites and allows one to configure and run executable and other scripts.
http://www.hanselman.com/blog/IntroducingWindowsAzureWebJobs.aspx
Chief Technology Officer - Anybill Financial Services
- Proposed as answer by Ed Price - MSFTMicrosoft employee Thursday, February 25, 2016 10:56 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Friday, February 26, 2016 10:13 PM
Thursday, July 3, 2014 1:56 PM -
Webjobs support QueueTriggers.
If you have your MVC controller put a message on such a queue (with the correct commandline parameters etc...) then the Webjob can get triggered and do it's magic based on the queuemessage contents.
See https://azure.microsoft.com/en-us/documentation/articles/websites-dotnet-webjobs-sdk-storage-queues-how-to/
- Proposed as answer by Ed Price - MSFTMicrosoft employee Thursday, February 25, 2016 10:56 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Friday, February 26, 2016 10:13 PM
Thursday, June 11, 2015 9:06 AM -
Hi if your using visual studio 2013 or 2015 and the Azure SDK from version 2.4 you can package a webjob console application and deploy it without leaving Visual Studio, You can convientley deploy a webjob along side a web project but it can be difficult to scale the webjob independently of the website. There are issues of potential resource contention between the website handling requests and the webjob performing its processing. Within Visual Studio it is possible to associate a webjob with a web project at a later time if you consolidate the deployment. For more info on webjobs and websites and developing a web project see http://azure.microsoft.com/en-us/documentation/articles/websites-dotnet-deploy-webjobs
- Edited by Lee StottMicrosoft employee, Moderator Tuesday, August 18, 2015 7:04 PM
- Proposed as answer by Lee StottMicrosoft employee, Moderator Wednesday, August 26, 2015 4:18 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Friday, February 26, 2016 10:13 PM
Tuesday, August 18, 2015 7:00 PMModerator
All replies
-
Did you checkout Windows Azure WebJobs? This is a feature related to Azure Websites and allows one to configure and run executable and other scripts.
http://www.hanselman.com/blog/IntroducingWindowsAzureWebJobs.aspx
Chief Technology Officer - Anybill Financial Services
- Proposed as answer by Ed Price - MSFTMicrosoft employee Thursday, February 25, 2016 10:56 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Friday, February 26, 2016 10:13 PM
Thursday, July 3, 2014 1:56 PM -
Thanks for reply Manny. I have recently study about web jobs. But I have still a problem regarding web jobs that I have not found any example/tutorial so that I can invoke a web jobs(console app) from asp.net mvc controller. Also I need to pass command line argument. How can I achieve this?Thursday, July 3, 2014 2:29 PM
-
Hi GYogeshKumar,
Since this thread is more related to TFS deployment to Microsoft Azure, I will move it to the right forum for a better response. Thanks for your understanding.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Edited by Bryant Hawthorne - MSFTMicrosoft employee Monday, August 4, 2014 12:15 AM test
Friday, July 4, 2014 2:00 AMModerator -
Webjobs support QueueTriggers.
If you have your MVC controller put a message on such a queue (with the correct commandline parameters etc...) then the Webjob can get triggered and do it's magic based on the queuemessage contents.
See https://azure.microsoft.com/en-us/documentation/articles/websites-dotnet-webjobs-sdk-storage-queues-how-to/
- Proposed as answer by Ed Price - MSFTMicrosoft employee Thursday, February 25, 2016 10:56 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Friday, February 26, 2016 10:13 PM
Thursday, June 11, 2015 9:06 AM -
Hi if your using visual studio 2013 or 2015 and the Azure SDK from version 2.4 you can package a webjob console application and deploy it without leaving Visual Studio, You can convientley deploy a webjob along side a web project but it can be difficult to scale the webjob independently of the website. There are issues of potential resource contention between the website handling requests and the webjob performing its processing. Within Visual Studio it is possible to associate a webjob with a web project at a later time if you consolidate the deployment. For more info on webjobs and websites and developing a web project see http://azure.microsoft.com/en-us/documentation/articles/websites-dotnet-deploy-webjobs
- Edited by Lee StottMicrosoft employee, Moderator Tuesday, August 18, 2015 7:04 PM
- Proposed as answer by Lee StottMicrosoft employee, Moderator Wednesday, August 26, 2015 4:18 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Friday, February 26, 2016 10:13 PM
Tuesday, August 18, 2015 7:00 PMModerator