Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Serverless computing in Azure with .NET

You're reading from  Serverless computing in Azure with .NET

Product type Book
Published in Aug 2017
Publisher Packt
ISBN-13 9781787288393
Pages 468 pages
Edition 1st Edition
Languages

Table of Contents (23) Chapters

Title Page
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
1. Understanding Serverless Architecture 2. Getting Started with the Azure Environment 3. Setting Up the Development Environment 4. Configuring Endpoints, Triggers, Bindings, and Scheduling 5. Integrations and Dependencies 6. Integrating Azure Functions with Cognitive Services API 7. Debugging Your Azure Functions 8. Testing Your Azure Functions 9. Configuring Continuous Delivery 10. Securing Your Application 11. Monitoring Your Application 12. Designing for High Availability, Disaster Recovery, and Scale 13. Designing Cost-Effective Services 14. C# Script-Based Functions 15. Azure Compute On-Demand Options

Creating the function


Let's take a look at the following steps to create the function:

  1. In Solution Explorer, right-click the project, choose Add -> New Item -> Azure Function, and enter ScoreText in the name. This will be the name of the .cs file that defines the function.
  2. In the next dialog, fill the following parameters:
    • Function type: HttpTrigger
    • AccessRights: Anonymous
    • FunctionName: ScoreText
  1. Click on Create.

You will see the ScoreText.cs file appear in the project tree.

Running the function locally

The function code is provided next. The auto-generated code implements the same behavior as we've seen in the HelloWorld function created online, however, you will notice a few differences in code. The differences exist because the online function was a C# script ( CSX ) based function.

The Visual Studio "precompiled" function template has references to a number of system libraries and the Azure.WebJobs libraries, and the function's Run method is annotated with attributes. The FunctionName attribute...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}