i'm new in azure and wanted to create an Event subscription to push any changes (here resource write success) from my blob storage to my Logic App via HTTP. In my Logic app i have a When a HTTP request is received, which would run when i send a request.
just wanted to demonstrate how i'm trying to create it.
NAME: 'i dont think this matters'
...
TOPIC NAME: 'just gave it a Random Name, should this refer to sth?'
Source Resource:'My Storage Account'
ENDPOINT:'i got the URL from the Overview page of my logic app (Workflow URL
)'
URL looks like this:
https://LOGICAPPNAME.azurewebsites.net:443/api/APPNAME/triggers/manual/invoke?api-version=2022-05-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=RjVKZbs-0CV559hZYlFfhM0k22W39lS5
when i copy and paste this to my browser i can trigger my Logic App. i think that act as a GET and i'm not sure if it sends it as POST or etc. it would make any difference.
and i got this error.
Deployment has failed with the following error: {"code":"Url validation","message":"Webhook validation handshake failed for https://LOGICAPPNAME.azurewebsites.net/api/APPNAME/triggers/manual/invoke. Http POST request retuned 2XX response with response body . When a validation request is accepted without validation code in the response body, Http GET is expected on the validation url included in the validation event(within 10 minutes). For troublehooting, visit https://aka.ms/esvalidation. Activity id:ID, timestamp: DATE TIME"}
If there's still confusion on how i'm doing this, i'm trying to follow THIS EXAMPLE. How can i fix this Error?
After reproducing from my end, I could able to achieve this following the link you have provided using the below details for creation of my logic app.
The reason you are receiving that error is that you need to use Logic App HTTP Trigger Request URL as Web Hook's endpoint and not the Logicapp's URL.
NOTE: You don't really have to call the Trigger again, whenever you make any changes to your storage account the logic apps gets triggered.
RESULTS:
When Blob is Created
When a Blob is Deleted
REFERENCES: "When blob is added or modified" trigger will not be fired on subfolder" answered by SamaraSoucy-MSFT - Microsoft Q&A
I have an azure function which is supposed to call an on-prem API. The application works fine in my dev environment. But there is a problem when I deployed it to Azure. I have already set up a hybrid connection for my Azure function to connect to the on-prem server. But when I run the code to get a response from on-prem API I get a 204 error. I believe there is a problem with the connection to on-prem from Azure. Could you review my setting and advice if anything is wrong?
My Code:
var request = new RestRequest("**https://onPremServer.internal.myDomain.com:534**/api/token", Method.Post);
204 status code its not an Error. its successfully request and response.
200-206 status code its show successfully. and 204 status code show its not content return by the API. Its Api return content. You can change content from API Side.
The 204 (No Content) status code indicates that the server has
successfully fulfilled the request and that there is no additional
content to send in the response payload body.
204 status No Content by Apihandyman site.
Azure Functions Using Hybrid Connections by stefanroth.
I am using Azure CDN for Akamai and noticing that it return 400 Error code with following message - "We can only accept 100 paths for purging concurrently. Please try again in a few minutes."
I have Logic App which is triggered when a new asset is uploaded in storage account. This error happens only for 50% of changes.
How do I handle this ? The retry policy on logic app does not trigger because it's 400 status code.
As per documentation it says 50 concurrent request at profile level. but my workload sends only 10 request and REST api process 5 request successfully.
I have a bot deployed on Azure using Bot Framework. Nothing was changed on the code. But today the bot became completely unresponsive. Any message I try to send results invariably in a "Couldn't Send. Retry?" message. Occasionally in past I could see the bot was slower to reply to one or other message, but this time is a different thing, the bot is completely mute. On inspecting the issues for web chat channel on azure dashboard I can see that the errors are all the same "There was an error sending this message to your bot: HTTP status code GatewayTimeout". What may I be doing wrong?
Just in case it is relevant, the bot uses LUIS services and also a database both deployed in azure. Tried to access these services separately and they are working fine with good response time. Anyway, I don't think the bot program reaches the point of trying to communicate with any of them. I doesn't even reach the first IDialogContext.PostAsync() which is the very first instruction on the StartAsync() method in the root dialog. Help with this much appreciated
the errors are all the same "There was an error sending this message to your bot: HTTP status code GatewayTimeout". What may I be doing wrong?
Firstly, I do a test with the following sample, and if the request take a long time to get response, which might cause " Gateway Timeout" issue. You can turn on Application Insights with your bot application to trace the request(s) sent from your bot, and check if some requests take too long time.
Example:
private async Task MessageReceivedAsync(IDialogContext context, IAwaitable<object> result)
{
var activity = await result as Activity;
// calculate something for us to return
int length = (activity.Text ?? string.Empty).Length;
if (activity.Text.ToLower().Contains("timeout test"))
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://xxxxx/api/values/xxx");
request.Method = "GET";
request.ContentType = "application/json";
//I set a 30s delay for returning response in my external api
var response = request.GetResponse();
string content = string.Empty;
using (var stream = response.GetResponseStream())
{
using (var sr = new StreamReader(stream))
{
content = sr.ReadToEnd();
}
}
activity.Text = content.ToString();
// return our reply to the user
await context.PostAsync($"API returned {activity.Text}");
}
else
{
// return our reply to the user
await context.PostAsync($"You sent {activity.Text} which was {length} characters");
}
context.Wait(MessageReceivedAsync);
}
Test result:
Secondly, if your Bot Service pricing tier is free, please check if your bot service reached 10,000 messages/month limit (for Premium channels). In this SO thread, another community member reported reaching that limit would cause " Gateway Timeout" error.
Besides, if possible, you can create a new bot service on Azure portal and then publish your bot application to that corresponding new Azure web app that you specified as messaging endpoint, and check if your bot app can work as expected on new Azure environment.
Note:
I also checked the status history of Azure services and found:
6/27 RCA - App Service - West Europe
Summary of impact: Between 16:00 UTC on 27 Jun 2018 and 13:00 UTC on 28 Jun 2018, a subset of customers using App Service in West Europe may have received HTTP 500-level response codes, timeouts or high latency when accessing App Service (Web, Mobile and API Apps) deployments hosted in this region.
6/25 RCA - Multiple Services - South Central US
Summary of impact: Between 19:40 and 20:52 UTC on 25 Jun 2018, a subset of customers in South Central US may have experienced difficulties connecting to resources and/or 500-level errors hosted in this region. Virtual Machines may have rebooted unexpectedly. Impacted services included: Storage, Virtual Machines, Key Vault, Site Recovery, Machine Learning, Cloud Shell, Logic Apps, Redis Cache, Visual Studio Team Services, Service Bus, ExpressRoute, Application Insights, Backup, Networking, API Management, App Service (Linux) and App Service.
Not sure if above issue causes the problem, if you tried all approaches that you can do to troubleshoot the issue, but the issue with your bot service is still not mitigated, you can try to create support request to report it.
Try enabling [botauthentication] in message controller. Also try to open outgoing connection also from your IIS server to internet. By the way there can be some other problems as well like :
1)Your web.config file contains an App ID that does not match the one you posted.
2)Your server's time is incorrect. Tokens have 20 minutes of validity (5 minutes before the token was issued and 15 minutes after.) Is it possible your server time is different?
3)Your bot encountered a problem retrieving list of signing keys. Check to make sure you can access these URLs:
https://api.aps.skype.com/v1/keys
https://login.botframework.com/v1/.well-known/keys
You can also follow this issue to check if you're doing it correctly https://github.com/Microsoft/BotBuilder/issues/4389
I'm trying to make some calls to the new Azure Scheduler API. However, all my requests come back with this error:
<Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Code>AuthenticationFailed</Code>
<Message>The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription.</Message>
</Error>
I'm pretty sure that I have everything setup correct because I can make calls using the same code and certificate to the Azure Service Management API.
The code I'm using to attach the certificate to the web request is from the MSDN Sample. The Scheduler API calls that I've tried to make are the Check Name Availability, Create Cloud Service, and Create Job Collection.
I've also verified that my subscription is Active for the preview of the Scheduler.
Here is an example of a request I've tried:
Create Cloud Service
Request A cloud service is created by submitting an HTTP PUT operation
to the CloudServices OData collection of the Service Management API
Tenant.Replace with your subscription ID and
with your cloud service ID.
So for this I create a web request pointing to:
https://management.core.windows.net/[MySubId]/cloudServices/[MyNewServiceName]
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(requestUri);
// Define the requred headers to specify the API version and operation type.
request.Headers.Add("x-ms-version", "2012-03-01");
request.Method = "PUT";
request.ContentType = "application/xml";
Next I add the request body as specified in the documentation:
<CloudService xmlns:i='http://www.w3.org/2001/XMLSchema-instance' xmlns='http://schemas.microsoft.com/windowsazure'>
<Label>[MyServiceName]</Label>
<Description>testing</Description>
<GeoRegion>uswest</GeoRegion>
</CloudService>
And finally I add the certificate that I use with my subscription to the account.
// Attach the certificate to the request.
request.ClientCertificates.Add(certificate);
I try to get the response and instead I get the error shown above.
BTW - I've also tried different regions thinking maybe it was a region issue since the scheduler isn't supported in all regions, but I still get the same response.
You need to register the scheduler in your application first by calling (PUT):
<subscription id>/services?service=scheduler.JobCollections&action=register
If you want to do this in .NET you can use the new Management libraries:
var schedulerServiceClient = new SchedulerManagementClient(credentials);
var result = schedulerServiceClient.RegisterResourceProvider();
Console.WriteLine(result.RequestId);
Console.WriteLine(result.StatusCode);
Console.ReadLine();
More detail: http://fabriccontroller.net/blog/posts/a-complete-overview-to-get-started-with-the-windows-azure-scheduler/