locked
Data Points - Creating Azure Functions to Interact with Cosmos DB RRS feed

  • General discussion

  • In the second column in a series, Julie Lerman updates her Cookie Binge app. This time she shows you how to take advantage of Azure Functions to hook up your app with Azure Cosmos DB.

    Read this article in the January 2018 issue of MSDN Magazine

    Tuesday, January 2, 2018 6:30 PM

All replies

  • Hey, I followed this post ( https://msdn.microsoft.com/en-us/magazine/mt814991 ) and I'm getting the following error in the functions log:

    =========================================

    2018-10-22T07:07:07  Welcome, you are now connected to log-streaming service.
    2018-10-22T07:07:21.144 [Information] Executing 'Functions.StoreScores' (Reason='This function was programmatically called via the host APIs.', Id=d20e0db7-fe98-41e0-8ea3-55734122135d)
    2018-10-22T07:07:21.155 [Error] Function compilation error
    Microsoft.CodeAnalysis.Scripting.CompilationErrorException : Script compilation failed.
       at async Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.CreateFunctionTarget(CancellationToken cancellationToken) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\DotNet\DotNetFunctionInvoker.cs : 314
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at async Microsoft.Azure.WebJobs.Script.Description.FunctionLoader`1.GetFunctionTargetAsync[T](Int32 attemptCount) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\FunctionLoader.cs : 55
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at async Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.GetFunctionTargetAsync(Boolean isInvocation) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\DotNet\DotNetFunctionInvoker.cs : 183
    2018-10-22T07:07:21.169 [Warning] run.csx(25,3): warning CS0618: 'TraceWriter' is obsolete: 'Will be removed in an upcoming version. Use Microsoft.Extensions.Logging.ILogger instead.'
    2018-10-22T07:07:21.174 [Error] run.csx(29,15): error CS1729: 'BingeDocument' does not contain a constructor that takes 2 arguments
    2018-10-22T07:07:21.185 [Error] run.csx(33,16): error CS1501: No overload for method 'CreateResponse' takes 2 arguments
    2018-10-22T07:07:21.196 [Error] run.csx(36,16): error CS1501: No overload for method 'CreateResponse' takes 2 arguments
    2018-10-22T07:07:21.213 [Error] Executed 'Functions.StoreScores' (Failed, Id=d20e0db7-fe98-41e0-8ea3-55734122135d)
    Script compilation failed.
    2018-10-22T07:09:07  No new trace in the past 1 min(s).

    =========================================

    Can anyone help?

    Monday, October 22, 2018 5:55 PM