What is the URI of an ActionResult for a website hosted on Windows Azure? (To be used for Scheduler)

StackOverflow https://stackoverflow.com/questions/23066620

  •  03-07-2023
  •  | 
  •  

Pregunta

So I've uploaded a website onto Azure and within the webapp I have a controller with an ActionResult that when called, refreshes variables (and takes in no parameters). I want to use Azure's Scheduler (http://msdn.microsoft.com/en-us/library/azure/dn495651.aspx) to setup a web job to run a HTTP Get webjob with this ActionResult at a scheduled time, but I need a URI. I know the website is [website].azurewebsites.net, so would I set the URI to [website].azurewebsites.net/SomeController/Refresh ?

Edit: Tried http:// [website].azurewebsites.net/ControllerName/ActionResultName but it didn't work and got a 'Not Found' when the job ran.

¿Fue útil?

Solución

Problem solved, I had defined the ActionResult as a [HttpPost] and so I needed a Post job property, not a Get one.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top