Skip to main content

Posts

Showing posts with the label Azure

Secure Logic App HTTP Endpoints with Azure API Management

Prerequisites ? Azure Subscription PostMan / Fiddler / VS Code with Rest Client Extension ( https://marketplace.visualstudio.com/items?itemName=humao.rest-client ) A HTTP triggered Logic app (this will serve as the HTTP endpoint that we will secure using API Management, you can also do this with Azure Functions, Web API's/Web Services, etc.) What ? API Management (APIM) helps organizations publish APIs to external, partner, and internal developers to unlock the potential of their data and services. You can use API Management to publish APIs to external, partner, and employee developers securely and at scale.  In this blog, we will be configuring APIM so that we can use it to secure our Logic App HTTP Endpoint from public access. What are subscriptions? When you publish APIs through API Management, it's easy and common to secure access to those APIs by using subscription keys. Developers who need to consume the published APIs must include a valid subscript...

Deep Dive into Dynamics 365 & Azure Cosmos DB using Azure Logic Apps

Logic Apps Logic Apps helps you build, schedule, and automate processes as workflows so you can integrate apps, data, systems, and services across enterprises or organizations. To build integration solutions with logic apps, we can choose from a growing gallery of ~200 built-in connectors, such as Dynamics 365, SQL Database, Azure services (Azure Cosmos DB, Azure Table Service, etc.), Office 365, Salesforce, Google, and more. These connectors provide triggers, actions, or both for creating logic apps that securely access and process data in real time. Benefits of using Azure Logic Apps: Out-of-the-box connectors reduce integration challenges Faster development using Logic App Templates Re-usability of the Logic Apps Pay only for what you use Use Case Today, we'll be looking at listing Dynamics 365 records, using Logic Apps, and then performing some processing on the data (sending email to retrieved accounts, storing contact email id in an Array Variable) and finall...

Handling Concurrency in Azure Functions (HTTP Triggered)

Concurrency & Isolation Concurrency is one of the most common requirements when we don't want the resource to be accessed by multiple requests at the same time. Lets say we have a Database that holds products stock information, then it is very important that any read/write operation that happens on the Database must hold the property of Isolation . The isolation property ensures that the concurrent execution of transactions results in a system state that would be obtained if transactions were executed sequentially, i.e., one after the other. Providing isolation is the main goal of concurrency control. Depending on the concurrency control method (i.e., if it uses strict – as opposed to relaxed – serializability), the effects of an incomplete transaction might not even be visible to another transaction. Options Available in Azure Functions Recently while working on Azure Functions, I discovered a really simple way of handling Concurrency via code. There are ways to con...

Swagger UI in ASP.NET Web API

What is SWAGGER UI? Swagger UI is an HTML/CSS/JS framework that provides interactive documentation of your RESTful APIs and generates a navigable UI of the documentation. Swagger UI provides automatically generated HTML assets that give you automatic documentation and even an online test tool. It is extremely easy to set up, and comes with a lot of configurable options like XML Documentation, various kinds of Authentications (Basic, OAUTH2, API key), etc. which can be configured depending on the security schemes set up in your APIs. This can reduce the time and efforts you spend on creating your Client Application to consume and test your RESTful APIs. With minimum amount of code, you will get an easy to use test client for your APIs. Benefits of using SWAGGER UI? A Sandbox! Create test client for your APIs in seconds! It's comprehensible for developers and non-developers. It's easily adjustable. It’s like a sitemap for your API. How to set Up the Swagger...

Creating Azure Function from Visual Studio 2017 triggered from Azure Service Bus Topic

Recently, I was building an Azure Function from Visual Studio and encountered an issue with the auto generated Function.cs class file. My requirement was to create an Azure Function that would get triggered as soon as we receive a message on an Azure Service Bus Topic. For this I tried to use the Project template available in Visual Studio 2017. Unfortunately, when I tried to provide all the required values, and run the function, I got following error: First you get a warning which says: Warning: Cannot find value named 'Endpoint=sb:......' in local.settings.json that matches 'connection' property set on 'serviceBusTrigger' in '\Source\repos\FunctionApp1\MyFunction\bin\Debug\net461\Function1\function.json'. You can run 'func azure functionapp fetch-app-settings <functionAppName>' or specify a connection string in local.settings.json. This warning was followed by an error: [2/12/2018 9:48:05 AM] A ScriptHost error has occurre...

Scaling Azure Web Apps

What is Scaling? Scaling in Web Applications world refers to adaptability to changed load and traffic. Availability and Performance are the most important aspects of any Web Application. Hence, any Web App should be able to adapt to the changed amount of workload and traffic that it gets. When we deploy our web apps to azure, it is called an instance. It is allocated certain amount of hardware resources & servers depending upon your App Service Plan. There are basically two kinds of scaling that is performed on a web application: SCALE OUT (Horizontal) Scale Out refers to increasing the number of instances for your web application. To scale out a web app, you increase the number of virtual machine instances on which your web app is running. SCALE UP (Vertical) Scale Up refers to increasing the resource capacity, such as RAM and CPU cores, of the virtual machine on which your web app is running. Why Scaling? Pages load slowly, Network connections star...