Azure Functions - TimerTrigger - Error when ran locally












0

















I have an issue when I start Azure Functions project locally. I am using AzureFunctions v1 (.Net Framework). The error I get is following:
enter image description here





This is my local.settings.json:



{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
"StorageConnectionString": "UseDevelopmentStorage=true"
}
}


I googled the error without much luck.


What could be the couse of this error? Is it about configuration? Also, these are all TimerTrigger functions.


Thanks..



EDIT:



public class TimerPing: _BaseTrigger
{
static TimerPing()
{
Init();
}

[FunctionName("Timer_Ping")]
public static void Run([TimerTrigger("0 * * * * *", RunOnStartup = true)]TimerInfo myTimer, TraceWriter log)
{
//TryRun(() =>
//{
// ErrorHandler.InsertServiceLog(
// $"{SERVICE_NAME} - Ping",
// "ping",
// SensorType.Success);
//});
}
}




Please note that everything is commented out and this error still presists.

Also, in Output window on VS 2017 I get this:
Exception thrown: 'System.NotSupportedException' in mscorlib.dll

And I am running this locally using Azure.Functions.Cli1.0.12










share|improve this question

























  • Could you please add your code in Function.cs? It's fine at my side.

    – Ivan Yang
    Nov 22 '18 at 10:19













  • @IvanYang Sure, just a second..

    – Lazar Cvijovic
    Nov 22 '18 at 10:21











  • @IvanYang edited..

    – Lazar Cvijovic
    Nov 22 '18 at 10:25











  • Seams that something wrong in the Init() method, can you share it?

    – Ivan Yang
    Nov 22 '18 at 12:00











  • @IvanYang sorry, I can`t.. but the method is fine, I am 100% certain, since it only does one small thing, and when debugging it goes without error, plus the values that should be populated after Init() runs are fine. Any other idea? And thanks for taking interest btw..

    – Lazar Cvijovic
    Nov 22 '18 at 12:06
















0

















I have an issue when I start Azure Functions project locally. I am using AzureFunctions v1 (.Net Framework). The error I get is following:
enter image description here





This is my local.settings.json:



{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
"StorageConnectionString": "UseDevelopmentStorage=true"
}
}


I googled the error without much luck.


What could be the couse of this error? Is it about configuration? Also, these are all TimerTrigger functions.


Thanks..



EDIT:



public class TimerPing: _BaseTrigger
{
static TimerPing()
{
Init();
}

[FunctionName("Timer_Ping")]
public static void Run([TimerTrigger("0 * * * * *", RunOnStartup = true)]TimerInfo myTimer, TraceWriter log)
{
//TryRun(() =>
//{
// ErrorHandler.InsertServiceLog(
// $"{SERVICE_NAME} - Ping",
// "ping",
// SensorType.Success);
//});
}
}




Please note that everything is commented out and this error still presists.

Also, in Output window on VS 2017 I get this:
Exception thrown: 'System.NotSupportedException' in mscorlib.dll

And I am running this locally using Azure.Functions.Cli1.0.12










share|improve this question

























  • Could you please add your code in Function.cs? It's fine at my side.

    – Ivan Yang
    Nov 22 '18 at 10:19













  • @IvanYang Sure, just a second..

    – Lazar Cvijovic
    Nov 22 '18 at 10:21











  • @IvanYang edited..

    – Lazar Cvijovic
    Nov 22 '18 at 10:25











  • Seams that something wrong in the Init() method, can you share it?

    – Ivan Yang
    Nov 22 '18 at 12:00











  • @IvanYang sorry, I can`t.. but the method is fine, I am 100% certain, since it only does one small thing, and when debugging it goes without error, plus the values that should be populated after Init() runs are fine. Any other idea? And thanks for taking interest btw..

    – Lazar Cvijovic
    Nov 22 '18 at 12:06














0












0








0










I have an issue when I start Azure Functions project locally. I am using AzureFunctions v1 (.Net Framework). The error I get is following:
enter image description here





This is my local.settings.json:



{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
"StorageConnectionString": "UseDevelopmentStorage=true"
}
}


I googled the error without much luck.


What could be the couse of this error? Is it about configuration? Also, these are all TimerTrigger functions.


Thanks..



EDIT:



public class TimerPing: _BaseTrigger
{
static TimerPing()
{
Init();
}

[FunctionName("Timer_Ping")]
public static void Run([TimerTrigger("0 * * * * *", RunOnStartup = true)]TimerInfo myTimer, TraceWriter log)
{
//TryRun(() =>
//{
// ErrorHandler.InsertServiceLog(
// $"{SERVICE_NAME} - Ping",
// "ping",
// SensorType.Success);
//});
}
}




Please note that everything is commented out and this error still presists.

Also, in Output window on VS 2017 I get this:
Exception thrown: 'System.NotSupportedException' in mscorlib.dll

And I am running this locally using Azure.Functions.Cli1.0.12










share|improve this question


















I have an issue when I start Azure Functions project locally. I am using AzureFunctions v1 (.Net Framework). The error I get is following:
enter image description here





This is my local.settings.json:



{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
"StorageConnectionString": "UseDevelopmentStorage=true"
}
}


I googled the error without much luck.


What could be the couse of this error? Is it about configuration? Also, these are all TimerTrigger functions.


Thanks..



EDIT:



public class TimerPing: _BaseTrigger
{
static TimerPing()
{
Init();
}

[FunctionName("Timer_Ping")]
public static void Run([TimerTrigger("0 * * * * *", RunOnStartup = true)]TimerInfo myTimer, TraceWriter log)
{
//TryRun(() =>
//{
// ErrorHandler.InsertServiceLog(
// $"{SERVICE_NAME} - Ping",
// "ping",
// SensorType.Success);
//});
}
}




Please note that everything is commented out and this error still presists.

Also, in Output window on VS 2017 I get this:
Exception thrown: 'System.NotSupportedException' in mscorlib.dll

And I am running this locally using Azure.Functions.Cli1.0.12







azure azure-devops azure-storage azure-functions






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 10:25







Lazar Cvijovic

















asked Nov 22 '18 at 10:10









Lazar CvijovicLazar Cvijovic

105




105













  • Could you please add your code in Function.cs? It's fine at my side.

    – Ivan Yang
    Nov 22 '18 at 10:19













  • @IvanYang Sure, just a second..

    – Lazar Cvijovic
    Nov 22 '18 at 10:21











  • @IvanYang edited..

    – Lazar Cvijovic
    Nov 22 '18 at 10:25











  • Seams that something wrong in the Init() method, can you share it?

    – Ivan Yang
    Nov 22 '18 at 12:00











  • @IvanYang sorry, I can`t.. but the method is fine, I am 100% certain, since it only does one small thing, and when debugging it goes without error, plus the values that should be populated after Init() runs are fine. Any other idea? And thanks for taking interest btw..

    – Lazar Cvijovic
    Nov 22 '18 at 12:06



















  • Could you please add your code in Function.cs? It's fine at my side.

    – Ivan Yang
    Nov 22 '18 at 10:19













  • @IvanYang Sure, just a second..

    – Lazar Cvijovic
    Nov 22 '18 at 10:21











  • @IvanYang edited..

    – Lazar Cvijovic
    Nov 22 '18 at 10:25











  • Seams that something wrong in the Init() method, can you share it?

    – Ivan Yang
    Nov 22 '18 at 12:00











  • @IvanYang sorry, I can`t.. but the method is fine, I am 100% certain, since it only does one small thing, and when debugging it goes without error, plus the values that should be populated after Init() runs are fine. Any other idea? And thanks for taking interest btw..

    – Lazar Cvijovic
    Nov 22 '18 at 12:06

















Could you please add your code in Function.cs? It's fine at my side.

– Ivan Yang
Nov 22 '18 at 10:19







Could you please add your code in Function.cs? It's fine at my side.

– Ivan Yang
Nov 22 '18 at 10:19















@IvanYang Sure, just a second..

– Lazar Cvijovic
Nov 22 '18 at 10:21





@IvanYang Sure, just a second..

– Lazar Cvijovic
Nov 22 '18 at 10:21













@IvanYang edited..

– Lazar Cvijovic
Nov 22 '18 at 10:25





@IvanYang edited..

– Lazar Cvijovic
Nov 22 '18 at 10:25













Seams that something wrong in the Init() method, can you share it?

– Ivan Yang
Nov 22 '18 at 12:00





Seams that something wrong in the Init() method, can you share it?

– Ivan Yang
Nov 22 '18 at 12:00













@IvanYang sorry, I can`t.. but the method is fine, I am 100% certain, since it only does one small thing, and when debugging it goes without error, plus the values that should be populated after Init() runs are fine. Any other idea? And thanks for taking interest btw..

– Lazar Cvijovic
Nov 22 '18 at 12:06





@IvanYang sorry, I can`t.. but the method is fine, I am 100% certain, since it only does one small thing, and when debugging it goes without error, plus the values that should be populated after Init() runs are fine. Any other idea? And thanks for taking interest btw..

– Lazar Cvijovic
Nov 22 '18 at 12:06












1 Answer
1






active

oldest

votes


















0














From the error screenshot you provided, The type initializer xxx in TimerPing.TimerPing(static constructor) throw an exception, so you should check the Init() method in it. Hope it helps.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53428517%2fazure-functions-timertrigger-error-when-ran-locally%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    From the error screenshot you provided, The type initializer xxx in TimerPing.TimerPing(static constructor) throw an exception, so you should check the Init() method in it. Hope it helps.






    share|improve this answer




























      0














      From the error screenshot you provided, The type initializer xxx in TimerPing.TimerPing(static constructor) throw an exception, so you should check the Init() method in it. Hope it helps.






      share|improve this answer


























        0












        0








        0







        From the error screenshot you provided, The type initializer xxx in TimerPing.TimerPing(static constructor) throw an exception, so you should check the Init() method in it. Hope it helps.






        share|improve this answer













        From the error screenshot you provided, The type initializer xxx in TimerPing.TimerPing(static constructor) throw an exception, so you should check the Init() method in it. Hope it helps.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 22 '18 at 12:49









        Ivan YangIvan Yang

        2,594125




        2,594125






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53428517%2fazure-functions-timertrigger-error-when-ran-locally%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            404 Error Contact Form 7 ajax form submitting

            How to know if a Active Directory user can login interactively

            TypeError: fit_transform() missing 1 required positional argument: 'X'