Scheduled Azure WebJob Scheduler log suddenly reporting 401 - Unauthorized - azure

I have scheduled a (single, free) WebJob. This has been working fine form months. I just updated to the newest Azure WebJobs Nuget, which may be circumstantial.
What I now get in the Azure WebJob scheduler logs is the following although I deployed everything without errors from Visual Studio 2015. My other, non scheduled webjobs that I deployed to the same server at the same time work fine. Who can tell me where I need to look/change?
Http Action - Response from host 'dummy4711(account).scm.azurewebsites.net': 'Unauthorized' Response Headers: Date: Mon, 29 Feb 2016 23:32:03 GMT
Server: Microsoft-IIS/8.0
WWW-Authenticate: Basic realm="site"
Body: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <title>401 - Unauthorized: Access is denied due to invalid credentials.

Can you check your connection string? That's what the error is telling you.
Access is denied due to invalid credentials
Maybe you wiped them or change them before deploying.
EDIT
Here's a link to an example to set this up.

Had the same problem yesterday with a new job deployment, something went broke either with the new portal or Web Jobs SDK Update I just installed in VS 2015...
The cause was as small as hard to notice.
How did I solve it?
New portal, go to Scheduler Jobs > {job name} > Settings > Action Settings
Be sure to have action set to HTTPS and the URL should start with HTTPS://...
I don't know why my VS2015 SP1 was setting up the scheduler job with https but action was set to http, this cause the HTTP 401 error.
Cheers.

Related

NonAuthoritativeInformation error while invoking rest api through pre deployment gates

My release pipeline is invoking rest api from pre deployment gates
but I keep getting
2022-04-20T16:44:28.3116572Z GET https://dev.azure.com/myOrg/myProj/_apis/test/runs?minLastUpdatedDate=2022-04-17&maxLastUpdatedDate=2022-04-17&api-version=6.0
Response Code: NonAuthoritativeInformation
Response:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
....
I have this in service connection
and the below as pre deployment gate
When the request is sent through postman, it works fine. I just mention PAT in authorization field in headers
What is my pre deployment gate configuration missing here?

gitHubAutoDeployer for Google Cloud Functions auth redirects

I'm attempting to use the gitHubAutoDeployer function provided by:
https://github.com/GoogleCloudPlatform/community/blob/master/tutorials/cloud-functions-github-auto-deployer/index.md
I followed the project, but upon deploying and trying to trigger it, I discovered that the response to my webhook was a Google OAuth screen (in the GitHub project, go to Settings > Webhooks > Recent Deliveries). I went ahead and made the request interactive in a browser so I could provide access. After providing my credentials, I was redirected to the following:
<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>403 Forbidden</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Forbidden</h1>
<h2>Your client does not have permission to get URL <code>/gitHubAutoDeployer</code> from this server.</h2>
<h2></h2>
</body></html>
Now, Recent Deliveries in GitHub respond with a 302:
Content-Length: 2
Content-Type: text/html
Date: Mon, 30 Mar 2020 15:02:27 GMT
Location: https://accounts.google.com/ServiceLogin?service=ah&passive=true&continue=https://appengine.google.com/_ah/conflogin%3Fcontinue%3Dhttps://us-central1-REDACTED.cloudfunctions.net/gitHubAutoDeployer
Server: Google Frontend
X-Cloud-Trace-Context: d3333e1490ee3ca522c37243673931ed
What am I doing wrong? Any thoughts?
UPDATE: I opened an issue on the project's GitHub - there's a little more information available over there:
https://github.com/GoogleCloudPlatform/community/issues/1202
I also followed the tutorial on the project you referenced and I got the same result.
However, I achieved the expected behavior using Cloud Build with Continuous deployment

Azure App Service Continuous Deployment Webhook doesn't work

(I already asked in the Microsoft Forum but didn't get an answer.)
I have an App Service using a private registry with Continuous Deployment enabled. The app is running totally fine but the Webhook URL for the Continuous Deployment doesn't work.
Here's the output of an HTTP GET request to the webhook:
$ curl https://\$MySiteName:SomeLongPassword#mysite.scm.azurewebsites.net/docker/hook
"No route registered for '/docker/hook'"
Someone in the Microsoft Forum told me to try a POST request, so here's the output of that:
$ curl -X POST https://\$MySiteName:SomeLongPassword#mysite.scm.azurewebsites.net/docker/hook
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Length Required</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Length Required</h2>
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
</BODY></HTML>
I haven't found anywhere in the Microsoft Azure docs how to use the webhook.
After more searching, I found this answer.
The answer suggests to do the following:
curl https://\$MySiteName:SomeLongPassword#mysite.scm.azurewebsites.net/docker/hook -H "" -d ""
No idea why this works and I wish there was something in the Azure docs.

Azure App Service on Linux plan encoding issue

I deployed a node app "typically prerender server" to two different places and tested prerender with a get request to a url contains Arabic letters
1. Heruko: working perfectly
2. Azure App Service on linux plan failed with HTTP Error 400. The request URL is invalid.
here is the respond body from Postsman
<html>
<head>
<title>Bad Request</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">.cf-hidden { display: none; } .cf-invisible { visibility: hidden; }</style>
</head>
<body>
<h2>Bad Request - Invalid URL</h2>
<hr>
<p>HTTP Error 400. The request URL is invalid.</p>
</body>
</html>
Notice that the response head/meta contains charset=us-ascii
here is how the prerender node app see part of the url
u008aÙ\u0088Ù\u0085_Ù\u0085Ù\u0083رÙ\u0088Ù\u0086ع
i even created a node docker image to set language and locale to en_US.UTF-8 and changed Azure App to use this Docker image but still get error.
Any help please ?!
Unfortunately, after some investigation, I still don't understand why this issue occurred.
Actually App Service on Linux are still in Preview and not in Production yet. In this case, I would suggest you use an alternative offering, like Cloud Service or VM instead.
I have also tried to create prerender server on an Azure Linux Virtual Machine (Ubuntu Server 16.04 LTS), and it worked well.

how to reslove this C:\inetpub\wwwroot?

I am Pretty new in windows IIS server. i have successfully upload cakephp3.0 project.
when i access the website from windows IIS server it displays me following url in every page
**C:\inetpub\wwwroot**
I have also checked my header.My header part look Like this:-
enter code here
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
//MY Html Code
Even i have checked my all ctp but i don't know where th url comes from C:\inetpub\wwwroot. Can anyone help me. How to resolve this problem.
C:\inetpub\wwwroot is the default local path for websites in IIS. You can change it by right clicking on your website > Manage Web Site > Advanced settings > Physical Path:

Resources