azure-webjobs

Stopping Website from within a WebJob

柔情痞子 提交于 2019-12-11 04:36:11
问题 Is there any way of stopping an Azure website from a WebJob? I have an Azure Website using Ghost that runs on Node. I'm trying to schedule a backup of the Ghost database file which ideally should be done while the site is not running. I can stop the site temporarily by terminating the Node.exe process using the Kudu PowerShell console. If I try to do the same thing from a WebJob, the process does not get terminated - presumably because the WebJob is running in a different context and doesn't

Azure webjobs output logs indexing taking very long

冷暖自知 提交于 2019-12-11 04:03:21
问题 I have a frequently running triggered webjob (every 3 minutes) and others that are triggered weekly/daily and some running continuously. If I visit https://xxxx.scm.azurewebsites.net/azurejobs/#/functions the site takes forever to load as it tries to load and index function invocations and these get overwhelmed by the output from the frequent job. My questions: How can I set the logging retention for a particular webjob? Anything I write to the console shows up in the Webjob run details page

Azure Webjobs SDK is deleting a message when there is a binding failure - Bug?

二次信任 提交于 2019-12-11 01:44:28
问题 ASP.NET Webjobs is incorrectly deleting a message in a queue when there is a binding failure. The correct process should be that the message is not deleted and reappears after the visibility timeout to be processed again. Here is the invocation log running in pid: 6424 Timestamp:10:02:27 PM Parameters bound. Invoking user function. -------- -------- Exception while executing: System.InvalidOperationException, Error while binding function parameters. at Microsoft.WindowsAzure.Jobs

The Type initializer for Microsoft.Web.Deployment.DeploymentManager threw an exception

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 00:53:45
问题 Anyone have a solution for this? I am trying to deploy an Azure Webjob using Visual Studio 2015 and it keep throwing this error whenever I try to validate the connection to the server. I tried the solution in the first answer of this post, but I do not have those registry entries listed in the registry Web deployment task failed. (The type initializer for 'Microsoft.Web.Deployment.DeploymentManager' threw an exception.) I also tried to install the Web Deploy extension using nugget to the

Azure Webjob triggered twice

不羁的心 提交于 2019-12-11 00:18:27
问题 I used to use a scheduled trigger when deploying my webjobs, due to some problems I decided to use the settings.job with the onDemand trigger. My azure portal shows only 1 web job occurence, but in the log I can see it runs twice every time. In my https://echtemaaltijd.scm.azurewebsites.net/api/webjobs page, I see one instance per webjob, when I look at the scheduler log urls, I also see it's triggered only once. To prevent from triggering twice, I cleared the settings schedule property, and

File download from FTP fails only in Azure web app

假装没事ソ 提交于 2019-12-11 00:05:49
问题 I have this very basic code that downloads a list of text files from an FTP server: foreach (var fileUri in files) { try { var ftpRequest = (FtpWebRequest)FtpWebRequest.Create(fileUri); ftpRequest.Method = WebRequestMethods.Ftp.DownloadFile; ftpRequest.Credentials = new NetworkCredential("***", "***"); ftpRequest.UseBinary = false; ftpRequest.Timeout = 10_000; ftpRequest.ReadWriteTimeout = 10_000; using (WebResponse response = await ftpRequest.GetResponseAsync().ConfigureAwait(false)) using

Publish Azure Webjob with Schedule error

妖精的绣舞 提交于 2019-12-10 23:39:08
问题 I am having an issue with publishing a Webjob with a schedule from VS 2013. I can publish an "on demand" job no problems but I want it with a schedule. Here is the error I am getting below.. It looks like it cannot find the Microsoft.Web.WebJobs.Publish.Tasks.CreateScheduledWebJob when publishing. I have done everything to try sort it even updated VS2013 to version 3, added the Nuget Packages, Azure SDK, the publishing SDK, the Azure Scheduler Management Library, the Azure Service Management

View Azure WebJob Schedule in Portal?

ぐ巨炮叔叔 提交于 2019-12-10 22:36:40
问题 I created a simple Azure WebJob with a schedule via the Visual Studio integration to run once per day. I've deployed the WebJob and see it listed in my app on Azure. { "$schema": "http://schemastore.org/schemas/json/webjob-publish-settings.json", "webJobName": "MyJob", "startTime": "2015-12-10T03:00:00-05:00", "endTime": null, "jobRecurrenceFrequency": "Day", "interval": 1, "runMode": "Scheduled" } How can I actually once logged into the Azure Portal see that it will in fact run at 3 AM? I

HttpClient request failing sometimes in c#

≡放荡痞女 提交于 2019-12-10 22:09:24
问题 I have the similar code in my c# windows application. public async Task<HttpResponseMessage> SendHttpRequest() { HttpResponseMessage response = null; try { HttpClient client = new HttpClient(); string accessToken = await GetBearerToken(resourceUrl, clientId, clientSecret, tokenProviderUrl); if (!string.IsNullOrEmpty(accessToken)) httpRequest.Headers.Add("Authorization", ("Bearer " + accessToken)); response = await client.SendAsync(httpRequest); } catch(Exception ex) { log.Error("Exception

No route registered for WebJob

江枫思渺然 提交于 2019-12-10 18:18:13
问题 I have setup an Azure WebJob which is linked to a website (which is working fine) I seem to get lots of these errors: Http Action - Response from host 'site.scm.azurewebsites.net': 'NotFound' Response Headers: Pragma: no-cache Cache-Control: no-cache Date: Sat, 06 Dec 2014 05:00:06 GMT Set-Cookie: ARRAffinity=cookie;Path=/;Domain=site.scm.azurewebsites.net Server: Microsoft-IIS/8.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Body: "No route registered for '/api/triggeredwebjobs