Azure Functions - TimerTrigger - Error when ran locally
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I have an issue when I start Azure Functions project locally. I am using AzureFunctions v1 (.Net Framework). The error I get is following:
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
|
show 1 more comment
I have an issue when I start Azure Functions project locally. I am using AzureFunctions v1 (.Net Framework). The error I get is following:
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
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
|
show 1 more comment
I have an issue when I start Azure Functions project locally. I am using AzureFunctions v1 (.Net Framework). The error I get is following:
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
I have an issue when I start Azure Functions project locally. I am using AzureFunctions v1 (.Net Framework). The error I get is following:
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
azure azure-devops azure-storage azure-functions
edited Nov 22 '18 at 10:25
Lazar Cvijovic
asked Nov 22 '18 at 10:10
Lazar CvijovicLazar Cvijovic
206
206
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
|
show 1 more comment
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
|
show 1 more comment
1 Answer
1
active
oldest
votes
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 22 '18 at 12:49
Ivan YangIvan Yang
4,547128
4,547128
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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