Azure Function Console Log







It's a typical C# function with an HTTP. Logging To Application Insights In Azure Functions In my last post I covered logging in Azure Functions using TraceWriter and log4net. Email, phone, or Skype. In this post I'll show ways on maximizing the Azure Web Apps logging experience. Refer the article File structure on azure to know the sets of files & directories on Azure WebApps and Checkout the ' Enable diagnostics logging for web apps in Azure App Service ' for more details. NET console application to accept command line parameters and to return feedback and errors, and then how to call this console application in a SSIS Package and intercept the return code and (error) messages. Another known issue around the ILogger implementation on Functions is that the Azure Functions Core Tools that helps local debugging doesn’t display log to the console. This is the first of a 3-part mini series on managing your AWS Lambda logs. The following functions configure the logging module. Select your function app in Azure, and then select Yes to enable application logging for the function app. The main benefit will be the improved testability of your Azure Function as this parameter is much easier to mock. Azure Functions v2 Now Uses ASP. ini 1 - Message is sent by email to the address in the destination parameter. backup date discrepancy, backup date different, client backup differs from admin console backup The Admin Console shows a recent backup for a particular machine, but the Mozy client does not, or vice versa. Title: 0027 - Basic introduction to Azure Functions tutorial In this video we do a quick introduction to Azure Functions. NET App Azure Data Lake Store is an extendable store of Cloud data in Azure. For a full example of using the Firebase emulator suite, see the quickstart sample. What I mean by no debugging experience, is no ability to step on the code. SFTP/FTPS file transfers in Microsoft Azure WebJob If you need to export/backup data from your Microsoft Azure WebSite to a remote server or import data from the remote server to your WebSite, you can use WinSCP from Azure WebJob. js to connect to Azure SQL Database and perform read operations. Recently I had a discussion about Azure Functions, the pros and cons, and running multiple instances of batch processing simultaneously. Azure Service Fabric 6. In Functions v2. Application Insights is a logging platform that allows the collection and, more importantly, the collation of log data from any application. It is also termed as PaaS 2. I've previously written about them, and their limitations. Use Azure Functions to run a script or piece of code in response to a variety of events. To enable basic logging in your functions, you can include a parameter of type TraceWriter and an instance is provided to you. 0 in a Docker Container (on AWS, ZOMG). NET makes developing with Azure Queues accessible to. In my previous blog post, WebJobs in Azure with. There is a detailed document here "Azure Cosmos DB bindings for Azure Functions 2. In the series of articles about Microsoft Azure WebJob and Dependency Injection, we will learn how to process a function with a Job Handler. In Retention Period (Days), set the number of days the logs should be retained. Quick explanation of how to use Redis and, specifically, the StackExchange. AWS Lambda Function Logging in Java. to continue to Microsoft Azure. The debugger works the same as when it's connected to a local Node. My service plan is the shared one named I deployed the app code on BitBucket and linked my repo to the application with a correct destribution. They both can help run business logic for your applications and can also automate a lot of tasks in Azure. Microsoft is radically simplifying cloud dev and ops in first-of-its-kind Azure Preview portal at portal. Requirements An Azure subscription. Sadly this is not yet supported out of the box in Azure Functions V1 or V2 so you'll have to build it your own. Azure Migrate is a tool to facilitate rehosting servers in Azure. You do only get a Console. Azure Remote Debugging for Node. When developers need serverless today Azure Functions is typically chosen over webjobs. The labs contained in this article show how to create, configure, code and monitor an Azure Function with an Azure Cosmos DB. Delegating Admin Rights in Microsoft Azure. Azure Functions Core Tools. although as far as I know is on both backlogs. NET, JavaScript, and C++. Today Azure Functions another newer and improved serveless technology service the evolution of WebJobs. Then I wanted to write those logs out to the Application Logging (File System), Figure 1, Application Logging (Blob), Figure 2 and to the Log stream window in the portal, Figure 3. Here’s a sample Azure Event Hub triggered function that makes a simple log message. Here is the snippet of the code I am using. After the function. JS, Python, Batch,etc. Return JSON from C# Azure function In this blog post I’ll build a simple C# Azure function that returns an object as JSON. This module defines functions and classes which implement a flexible event logging system for applications and libraries. Logging data events for all functions will also enable logging of data event activity performed by any user or role in your AWS account, even if that. js Logging Right by Gergely Nemeth ( @nthgergo ) – Co-Founder of RisingStack, engineer at Uber The aim of this article is to provide help with logging in Node. Give $10, Get $10 Share Twilio using a personal referral link and get awarded for every successful referral. 2017-11-07 Since the Azure Function runtime is now ported to. I would also try the DebugAppender if you want to see your log statements in the Visual Studio Debug window so you don't have to open a log file. Azure Functions, Node. With CloudTrail, you can log, continuously monitor, and retain account activity related to actions across your AWS infrastructure. And it matters considering it’s the DoD cloud that every nation want to attack. Select the Azure Resource Type that you would like to enable. js applications running on Azure App Service on Linux. What it allows you to do is keeping your code and configuration clear of keys and passwords, or any kind of secrets in general. A web application gives you an IWebHost (built with the WebHostBuilder) which provides services to your application. Go to C:\NotificationCompAzureFunc\signalr-service-quickstart-serverless-chat\src\chat\javascript> and open vs code from there "code. For a full example of using the Firebase emulator suite, see the quickstart sample. This can be done either through the Azure portal or with the Azure CLI. Overview: I wanted a simple logging function that would both display to the screen, and also write to disk. It does however log entries to Application Insights although it is difficult to get access to this data. json If you couldn't tell by the name, Microsoft has intended for this local. WriteLine() or Console. And it matters considering it’s the DoD cloud that every nation want to attack. Azure functions can be used for very small pieces of code which can be invoked via any triggered events. CloudGuard delivers automated and elastic public cloud network security to keep assets and data protected while staying aligned to the dynamic needs of public cloud environments. Facebook for Developers empowers developers and businesses to build for the future. The azure-webJobs-dashboard container is used by the WebJob dashboard to store host and execution endpoint (function) details. In this article I will talk about how to make use of the WebJobs. Azure Functions - Time Trigger (CRON) Cheat Sheet This is a cheat sheet for CRON expressions that are used in the time triggers for Azure functions. My console app is now processing information from Azure blob storage without ever referencing the Azure Blob Storage API! The function is automatically called when a new blob (in my case, a new PNG) shows up in the input container in storage and the Stream parameters are automatically "bound" (like Model Binding) for me by the WebJobs SDK. As a web developer, the HTTP trigger is one of the most interesting. First create the Event Grid Topic in Azure. TraceWriter is defined in the Azure WebJobs SDK. After the function is created, the next line of the script that executes is line 30. Facebook for Developers empowers developers and businesses to build for the future. The first thing we want to do is create an Azure Function App with a function that acts as a file server. If you go here you'll get some information regarding integrating Application Insights with Azure Functions. In my last article I explain how to call an Azure Function to create a basic dynamic Hello World Logic App, it was a simple introduction to Azure Functions Integration inside Logic Apps. They both can help run business logic for your applications and can also automate a lot of tasks in Azure. This post just talk about initial introduction of Azure Function, and how to create you first Azure Function. IMPORTANT NOTE: The Cosmos DB Output. body’s shape is based on user-controlled input, all properties and values in this object are untrusted and should be validated before trusting. Azure Functions provides an ideal way to create the backend code in Node. io integration for Azure Functions v2 uses function filters and dependency injection part of the Microsoft. This review covers how to access the various types of Azure logging. Apparently there is an easy fix! So let’s try that one…. Introduction. Azure Service Fabric 6. log to output messages. You will be provided with a Cognitive service API endpoint and subscription keys used for. The WebJobs dashboard in the Azure management portal provides powerful management capabilities that give you full control over the execution of WebJobs, including the ability to invoke individual functions within WebJobs. Azure Queues are part of the Azure Storage offerings. Azure Functions enables you to create scheduled or triggered units of code implemented in various programming languages. 1: message is sent by email to the address in the destination parameter. Azure Functions provides an intuitive, browser-based user interface allowing you to create scheduled or triggered pieces of code implemented in a variety of programming languages 0 2. Customers interact with ARM every time they use the platform, but the primary interaction points are via PowerShell, Command line, APIs and/or. Functions are a subcomponent of Azure App Services, so the same resources required for App Services are also necessary for functions. To help Azure Administrators get the best out of their Cloud Infrastructures, we have searched and compiled a list of Azure monitoring tools. Azure Functions which can execute code in almost any modern language. Note that the version may be different in the future (it was current when I wrote this). However, there are many other scenarios that weren’t addressed in the post like:. The client split the list and send a message to Azure Storage Account Queue. Sign in - Google Accounts. Azure Functions Azure Functions, Microsoft's counterpart of Lambda, was created and introduced only at the end of March 2016. Creates a new Blob. Sometimes you need to modify the person that is the administrator for the subscription. Get unlimited access to the best stories on Medium. KUDU Console is a debugging service for Azure platform which allows you to explore your web app and surf the bugs present on it, like deployment logs, memory dump, and uploading files to your web app, and adding JSON endpoints to your web apps, etc. 5 Second Refresh Release servicefabric on 08-12-2019 10:49 AM Azure Service Fabric 6. The simplest log message includes a call to the extension method ILogger. Welcome to Microsoft Azure's home on YouTube. to continue to Microsoft Azure. Making function to do something useful (like updating Dynamics 365 records) was entirely different story. Logging is a very critical and essential part of any software. Microsoft is working hard to close the functionality and conceptual gap with Amazon, but lacking its competitor’s broad cloud portfolio, Functions has a more narrow scope in terms of overall functionality. Generic; using System. Enable application logging (Windows) To enable application logging for Windows apps in the Azure portal, navigate to your app and select App Service logs. Tracing and Application are framework that can be used in almost every situation. This can be done either through the Azure portal or with the Azure CLI. So in the situation where I lost connectivity, by misconfiguration, or system failure, is there only one very time and bandwith consuming way to fix it - download the VHDs on-premise, boot it in Hyper-V and VMConnect to repair. Then I wanted to write those logs out to the Application Logging (File System), Figure 1, Application Logging (Blob), Figure 2 and to the Log stream window in the portal, Figure 3. Welcome to Microsoft Azure's home on YouTube. Launch an app running in Azure in a few quick steps. It displays as expected when you deploy your Functions to Azure. NET console application running as an Azure Web Job will pick up configuration settings. 0+ (this is the runtime version supported by Azure Functions) Serverless CLI v1. Azure AD Connect. From @sandersonatlatitude on September 5, 2018 14:55 In the latest build all console logging of errors is gone, and my queueTrigger do not start. How to Get Node. It is now available in preview in the Azure Portal. Close PowerShell and open the Routing and Remote Access console and verify that the connection is complete. backup date discrepancy, backup date different, client backup differs from admin console backup The Admin Console shows a recent backup for a particular machine, but the Mozy client does not, or vice versa. In this post I'm going to show you how to add a custom logger. cs file or create a new one if not already there. Sadly this is not yet supported out of the box in Azure Functions V1 or V2 so you'll have to build it your own. 1) Log in to Azure You just need a free, personal Azure account to get started. Top Azure PaaS Services That Developers Love and Why Barry Luijbregts September 26, 2017 Developer Tips, Tricks & Resources The Microsoft Azure cloud offers a lot of services for almost every scenario that you might need. In the nodejs examples for Azure function apps, there is a passed in context obj to the function and it is possible to do context. io integration for Azure Functions v2 uses function filters and dependency injection part of the Microsoft. Log on to Azure Preview Portal. If you’re after part 1, check here: the what and why The following article will provide a more closer look at how Azure Functions can be used by you, the PowerShell guy. You will be provided with a Cognitive service API endpoint and subscription keys used for. Note Certain recommendations contained herein may result in increased data, network, or compute. The demand for the Azure Storage Client Library for Node. I'm now using an Autofac module to create ILogger instances using the LogFactory from an Azure functions context. Transform data into stunning visuals and share them with colleagues on any device. If you’re not familiar with Durable Functions you should check out the previous articles before reading this. Customers interact with ARM every time they use the platform, but the primary interaction points are via PowerShell, Command line, APIs and/or. Getting Credential from the console of Google Cloud Platform. PowerShell is one of those programming languages. However, there are many other scenarios that weren’t addressed in the post like:. But you’re likely going to want more control than just WriteLine(). We are going to retrieve the information of a table stored in Azure in our Windows application. There are multiple ways to enable logging inside your Azure Web Job. You can connect an HTTP function to Firebase Hosting. #Azure Functions - Quickstart #Pre-requisites Node. If you expand All. Functions are a subcomponent of Azure App Services, so the same resources required for App Services are also necessary for functions. Some tests either don't log messages or have no concern for how logging is implemented. Select the Function App within the details blade and click on CREATE as shown in the below image. Azure DevOps provides integration with popular open source and third-party tools and services—across the entire DevOps workflow. However, I cannot see any Console. Extensions package. Virtual machine console access There is no VMConnect capability for console access to the VM as there is with Hyper-V. My console app is now processing information from Azure blob storage without ever referencing the Azure Blob Storage API! The function is automatically called when a new blob (in my case, a new PNG) shows up in the input container in storage and the Stream parameters are automatically "bound" (like Model Binding) for me by the WebJobs SDK. Managed Service Identity (MSI) in Azure is a fairly new kid on the block. Azure Functions. This is what you need to enter in your project. proj file is uploaded, you see output like the following example in your function's streaming log:. Logging to Azure Application Insights from. Get unlimited access to the best stories on Medium. AWS Lambda Function Logging in Java. Similarly, it also doesn't log to the log in the Azure portal. NET developers. If you are using AWS as a provider, all functions inside the service are AWS Lambda functions. WriteLine() or Console. But i am not able to find the log statement added with console. After running some NEL (naked eye learning) algorithms against our sales pipeline we calculated that an average opportunity value is inflated by 20%. How to add a log statement here can anyone help? Moved by Neelesh Ray -MSFT Microsoft employee, Moderator Friday, April 15, 2016 2:59 AM Moving thread. This is for C#, Node. The screenshot above shows the Azure Portal for a few existing web jobs I have previously created. #Azure Functions - Quickstart #Pre-requisites Node. Update 5-10-2017: The first release of Visual Studio 2017 Tools for Azure Functions is now available to try. 3 For projects that support PackageReference , copy this XML node into the project file to reference the package. The following console runs and leaves log messages. For Web server logging, select Storage to store logs on blob storage, or File System to store logs on the App Service file system. No account? Create one!. Once you have created Azure SQL Analytics solution in your workspace, you need to configure the Managed Instance that you want to monitor to stream its diagnostics telemetry to the solution. Root Cause: Azure Resource Manager (ARM) is the underlying deployment and management service for Azure, providing the management layer that allows create, update, delete, etc. We go through a quick setup procedure of creating a Function App that. Azure AD Connect is a tool that connects functionalities of its two predecessors – Windows Azure Active Directory Sync, commonly referred to as DirSync, and Azure AD Sync (AAD Sync). NET Foundation. Working with Azure functions (part 1 - Powershell) Azure functions, also called Azure function apps, are a great way to build simple components - functions - and run them in the cloud (also called "serverless computing" or FaaS). How to send an Email using C# – complete features 266,569 views Testing ASP. log to output messag. Licensing For some customers, the simplicity of licensing is a big part of the attraction of moving to the cloud. On my Azure environment, I have various of these small functions running. Batch Shipyard Site Extension for use with Azure Functions/App Service. ps1 script follows the comment that points to the entry point of the script (this is the last line), and it calls the Add-RegistryValue function by passing two values for the -key and -value parameters. You can move data to and from Azure Data Lake Store via Azure data Factory or Azure SQL Database and connect to a variety of data sources. Title: 0027 - Basic introduction to Azure Functions tutorial In this video we do a quick introduction to Azure Functions. The main benefit will be the improved testability of your Azure Function as this parameter is much easier to mock. Power BI is a business analytics service that delivers insights to enable fast, informed decisions. Redis package in an Azure Function. Here’s a sample Azure Event Hub triggered function that makes a simple log message. A good starting point is a blog post from David O’Brien Azure Functions – PowerShell. You can also view these logs in Kudu or as the raw data stored in Table Storage under the storage account configured using the AzureWebJobsStorage setting. yml under the functions property. Azure Service Fabric 6. Developer Student Clubs train thousands of student developers globally and work with their communities to solve real-life problems. In part 2 I further explained what the runtime environment of Azure Functions looks like and showed an example of a small PowerShell based Azure Function. Azure web jobs are great ways to run scheduled tasks or handle events using storage queues, in the cloud. Logging library to be visible in console (if running locally) or function log files (during normal. writeline() and the console. To turn on the streaming logs for your function app in Azure: Select F1 to open the command palette, and then search for and run the command Azure Functions: Start Streaming Logs. Logging To Application Insights In Azure Functions In my last post I covered logging in Azure Functions using TraceWriter and log4net. log(), console. Debugging Azure Functions in Our Local Box - Kloud Blog 0. Launch an app running in Azure in a few quick steps. Microsoft is radically simplifying cloud dev and ops in first-of-its-kind Azure Preview portal at portal. In this post I'll show ways on maximizing the Azure Web Apps logging experience. I am able to debug remotely with VS2013, and I see where the Console. This doesn't log any messages to the console when debugging locally. Logging to Azure Application Insights from. Often, you need a way to monitor your applications once they are running on the server or even at the customer site — away from your Visual Studio debugger. log are captured at the Function App level. You can do the same from Visual Studio. Log in to Azure. NET or Console) with things like Dependency Injection, Configuration and Logging is as simple as can be. 2 responses to Handling Windows Azure Storage Exceptions dogu arslan June 22, 2016 at 6:13 AM I wrote an extension class to Azure StorageException that extracts this useful information directly from the execption object:. This review covers how to access the various types of Azure logging. Line 30 of the CreateRegistryKey. The IHost and HostBuilder give you a similar experience in a console application. The dashboard also displays function runtimes and output logs. Logging is a very critical and essential part of any software. Enable application logging (Windows) To enable application logging for Windows apps in the Azure portal, navigate to your app and select App Service logs. 0+ (this is the runtime version supported by Azure Functions) Serverless CLI v1. Colored console for log4net Make Good Use of Multiple Log Levels and Filter by Them. And it matters considering it’s the DoD cloud that every nation want to attack. Overview: I wanted a simple logging function that would both display to the screen, and also write to disk. Reference to the official Azure Web Apps Logging Document. KUDU - advanced console for Azure FunctionsIn part 1 I introduced the Azure Functions service to you and briefly explained what serverless computing means. Net Web API–GET, POST, PUT, DELETE using Fiddler 99,402 views How to download files from server to client using a Generic Handler 93,945 views. You can tell I'm working on Azure Functions from the frequency of posts. Apart from the logging info that are available in both, there is no debugging experience for either Logic Apps or Azure functions yet. It does not support binding ILogger or ILoggerFactory parameters, does not write entries to the local dev console and does not write to the Azure Portal log section. Out of the box Azure Functions does not come with dependency injection support you can use in your functions. Azure Functions enables you to create scheduled or triggered units of code implemented in various programming languages. 4 minutes read. Sub-orchestrations are a feature of Durable Functions that allow you to further compose and reuse functions. Within the configuration of the “Source” the listeners are configured. For Web server logging, select Storage to store logs on blob storage, or File System to store logs on the App Service file system. Robin Shahan Cerulean has been the saving grace of our team's day to day workload. Similarly, it also doesn't log to the log in the Azure portal. Getting Key Vault Secrets in Azure Functions. KUDU Console is a debugging service for Azure platform which allows you to explore your web app and surf the bugs present on it, like deployment logs, memory dump, and uploading files to your web app, and adding JSON endpoints to your web apps, etc. The function retrieves the objects; then store into Azure Storage Account(Blob). It does however log entries to Application Insights although it is difficult to get access to this data. Select a Data Center location; After deploy go to Azure and check your newly App. This means that your code will break with a ReferenceError: console is undefined on IE8, just like running console. If you’re not familiar with Durable Functions you should check out the previous articles before reading this. One thing I did notice though is the `ILogger` doesn't output any logging to the Azure Functions console application when running locally. This doesn't log any messages to the console when debugging locally. This is pricing for the Azure Databricks Premium SKU only. Hope This helps !. How to build and deploy your first app with Azure SDK for Java | Azure Tips and Tricks. log(), scrollTop(), resize() How do you debug your HTML and CSS? I am sure you’ve heard about Web Developer Tools or at least heard the term Inspect Element. Trigger your functions in Azure. Learn more about connecting Cloud Functions to Firebase Hosting. AzureWebJobsStorage should point to a storage account which will be primarily used for logging. js processes to handle the load. It is not intended to be committed to a source control repository and it is not intended to be deployed to an Azure environment. Sign in - Google Accounts - Firebase. This allows other application, services or users in an Azure subscription to store and retrieve these cryptographic keys, certificates and secrets. Azure Functions - Local Development Logging 14 June 2016 on functions, azure functions, appservice, azure, functional programming Azure Functions. Line 30 of the CreateRegistryKey. How to Create a Service Bus With Windows Azure Windows Azure Service Bus is a brokered, scalable, multi-featured messaging queueing system. To deploy Azure Functions, we need to provision a few resources in Azure. The vulnerability is due to ineffective management of the underlying filesystem resources. writeline() and the console. Working with Azure functions (part 1 - Powershell) Azure functions, also called Azure function apps, are a great way to build simple components - functions - and run them in the cloud (also called "serverless computing" or FaaS). In Functions, you use the context. From @sandersonatlatitude on September 5, 2018 14:55 In the latest build all console logging of errors is gone, and my queueTrigger do not start. You can move data to and from Azure Data Lake Store via Azure data Factory or Azure SQL Database and connect to a variety of data sources. We go through a quick setup procedure of creating a Function App that. You get the point. One of the immediate questions that came up in that discussion was; In the built-in logs you see in the streaming log service or in the log console, how do you know which message comes from what invocation?. Top Azure PaaS Services That Developers Love and Why Barry Luijbregts September 26, 2017 Developer Tips, Tricks & Resources The Microsoft Azure cloud offers a lot of services for almost every scenario that you might need. functions for the platform. Microsoft Azure (Windows Azure): Microsoft Azure, formerly known as Windows Azure, is Microsoft's public cloud computing platform. ini 1 - Message is sent by email to the address in the destination parameter. The screenshot below shows how the logs in portal would look. We go through a quick setup procedure of creating a Function App that. Part 3 - Azure AD Secured Azure Functions - Creating an Angular Client Application. The Event Grid Topic is the Azure Service were the events are sent to, and the Subscriptions are the applications that need to receive the events. Howto: Use Windows Azure Logging During Development and Production to Debug Your Application November 7, 2008 by Ben Day If you’re running your Windows Azure application on your local machine using the Visual Studio Development Fabric, it’s easy to figure out problems by simply putting a breakpoint in your code and using the debugger. This forum (General Feedback) is used for any broad feedback related to Azure. Welcome to Azure. The elements of blobParts must be of the types ArrayBuffer, ArrayBufferView, Blob, or String. It helps us in the investigation of the essence of problems. config module. Next, open the Twilio Console and find the phone number you want to use (or buy a new number ). Posted on December 21, Now you’ll log into the Ibiza portal and browse to the resource group that contains your service. js to connect to Azure SQL Database and perform read operations. I'm now using an Autofac module to create ILogger instances using the LogFactory from an Azure functions context. Their use is optional — you can configure the logging module using these functions or by making calls to the main API (defined in logging itself) and defining handlers which are declared either in logging or logging. In Functions, you use the context. json file to be for local development purposes only. Spend less time integrating and more time delivering higher-quality software, faster. To run the tests, press CTRL + ~ to open the command window, and run npm test: npm test Debug tests. In Retention Period (Days), set the number of days the logs should be retained. In this post, I will show how we can send custom events from any application or service into Event Grid, allowing us to integrate any service. log statements are executed. In the snip-it above it has a listener for Application Insights and for the Console Window. Extensions package. If the trail applies to a single region, this will log all functions in the current region and any you might create in that region, but will not enable logging of functions in other regions. Trigger your functions in Azure. 4 minutes read. log is only available after you have opened the Developer Tools (F12 to toggle it open and closed). Again, the callback is invoked with three arguments: the value of the element, the index of the element, and the Array object being traversed. But you’re likely going to want more control than just WriteLine(). The Windows Community Toolkit is a collection of helper functions, custom controls, and app services. Here, I just add several kinds of logging. Creating an Azure Function App from the CLI. Azure Functions custom logging with AppInsights 16 January 2017 Comments Posted in Azure, logging, Functions, Serverless. Microsoft is working hard to close the functionality and conceptual gap with Amazon, but lacking its competitor’s broad cloud portfolio, Functions has a more narrow scope in terms of overall functionality. There are quite a lot of ways to add dependency injection, but most of them rely on the Service Locator (anti-)pattern. Quick explanation of how to use Redis and, specifically, the StackExchange. Things to be aware of. Here's a good blog that shows you how to do that: Using strongly typed configuration in.