0
votes

I have a console app published to Azure as a web app with WebJob. The webjob properties list the webhook and it is running. I am testing with Postman and passing the argument(s) using the prescribed url query method. I get a 202 response, and the webjob log shows success, but I can see that no arguments are processed when the app is executed. This should be working, but it is not. My app works as a standalone executable from command line with arguments.

request url: https://myapp.scm.azurewebsites.net/api/triggeredwebjobs/MyWebJob/run?arguments={my arguments}

WebJob Log Success

1
Can you clarify what you mean by "no arguments are processed"? Do you mean that you don't see WEBJOBS_COMMAND_ARGUMENTS being set when your exe is launched?David Ebbo
You may also want to show some code to show people how you are attempting to access the query string arguments.David Yates
@DavidEbbo - I've added a screencap of the webjob log success message. The "No args" console message indicates that no arguments were passed into the run command. I added a no argument condition to my app to troubleshoot.Kevin Howe
@DavidYates - Not really sure what you mean by "accessing" query string arguments. According to the WebJob SDK (github.com/projectkudu/kudu/wiki/…), they are supposed to be passed into the triggered app when the arguments key is set with a value. My app accepts up to three arguments, (including none for the purpose of troubleshooting.)Kevin Howe
Did you check WEBJOBS_COMMAND_ARGUMENTS as per my previous comment?David Ebbo

1 Answers

2
votes

The problem is that you are using a run.cmd that does not flow the command line arguments. Try changing it to:

ShipstationTest.exe %*