Azure WebJobs SDK and Emulator - Triggers not working












3















I'm attempting to update azure SDK from v1 to v3, and hook it up to the Azure Storage Emulator for testing; using console application and .NET Framework.



It doesn't appear to like any of the triggers that worked previously, the 'SomeFunction' in the error is a simple QueueTrigger with a timeout.



Exception: Microsoft.Azure.WebJobs.Host.Indexers.FunctionIndexingException: 'Error indexing method '*.SomeFunction'



Inner Exception: InvalidOperationException: Storage account 'Storage' is not configured.



[Timeout("00:30:00")]
public static async Task SomeFunction([QueueTrigger("queue")] CloudQueueMessage message, CancellationToken cancellationToken)
{
// do stuff
}


app.config:



<connectionStrings>
<add name="AzureWebJobsDashboard" connectionString="AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;DefaultEndpointsProtocol=http;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;" />
<add name="AzureWebJobsStorage" connectionString="AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;DefaultEndpointsProtocol=http;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;" />
</connectionStrings>
<appSettings>
<add key="StorageConnectionString" value="UseDevelopmentStorage=true" />
<add key="AzureQueueName" value="queue" />
</appSettings>









share|improve this question



























    3















    I'm attempting to update azure SDK from v1 to v3, and hook it up to the Azure Storage Emulator for testing; using console application and .NET Framework.



    It doesn't appear to like any of the triggers that worked previously, the 'SomeFunction' in the error is a simple QueueTrigger with a timeout.



    Exception: Microsoft.Azure.WebJobs.Host.Indexers.FunctionIndexingException: 'Error indexing method '*.SomeFunction'



    Inner Exception: InvalidOperationException: Storage account 'Storage' is not configured.



    [Timeout("00:30:00")]
    public static async Task SomeFunction([QueueTrigger("queue")] CloudQueueMessage message, CancellationToken cancellationToken)
    {
    // do stuff
    }


    app.config:



    <connectionStrings>
    <add name="AzureWebJobsDashboard" connectionString="AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;DefaultEndpointsProtocol=http;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;" />
    <add name="AzureWebJobsStorage" connectionString="AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;DefaultEndpointsProtocol=http;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;" />
    </connectionStrings>
    <appSettings>
    <add key="StorageConnectionString" value="UseDevelopmentStorage=true" />
    <add key="AzureQueueName" value="queue" />
    </appSettings>









    share|improve this question

























      3












      3








      3


      2






      I'm attempting to update azure SDK from v1 to v3, and hook it up to the Azure Storage Emulator for testing; using console application and .NET Framework.



      It doesn't appear to like any of the triggers that worked previously, the 'SomeFunction' in the error is a simple QueueTrigger with a timeout.



      Exception: Microsoft.Azure.WebJobs.Host.Indexers.FunctionIndexingException: 'Error indexing method '*.SomeFunction'



      Inner Exception: InvalidOperationException: Storage account 'Storage' is not configured.



      [Timeout("00:30:00")]
      public static async Task SomeFunction([QueueTrigger("queue")] CloudQueueMessage message, CancellationToken cancellationToken)
      {
      // do stuff
      }


      app.config:



      <connectionStrings>
      <add name="AzureWebJobsDashboard" connectionString="AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;DefaultEndpointsProtocol=http;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;" />
      <add name="AzureWebJobsStorage" connectionString="AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;DefaultEndpointsProtocol=http;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;" />
      </connectionStrings>
      <appSettings>
      <add key="StorageConnectionString" value="UseDevelopmentStorage=true" />
      <add key="AzureQueueName" value="queue" />
      </appSettings>









      share|improve this question














      I'm attempting to update azure SDK from v1 to v3, and hook it up to the Azure Storage Emulator for testing; using console application and .NET Framework.



      It doesn't appear to like any of the triggers that worked previously, the 'SomeFunction' in the error is a simple QueueTrigger with a timeout.



      Exception: Microsoft.Azure.WebJobs.Host.Indexers.FunctionIndexingException: 'Error indexing method '*.SomeFunction'



      Inner Exception: InvalidOperationException: Storage account 'Storage' is not configured.



      [Timeout("00:30:00")]
      public static async Task SomeFunction([QueueTrigger("queue")] CloudQueueMessage message, CancellationToken cancellationToken)
      {
      // do stuff
      }


      app.config:



      <connectionStrings>
      <add name="AzureWebJobsDashboard" connectionString="AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;DefaultEndpointsProtocol=http;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;" />
      <add name="AzureWebJobsStorage" connectionString="AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;DefaultEndpointsProtocol=http;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;" />
      </connectionStrings>
      <appSettings>
      <add key="StorageConnectionString" value="UseDevelopmentStorage=true" />
      <add key="AzureQueueName" value="queue" />
      </appSettings>






      c# azure azure-storage azure-webjobs azure-sdk-.net






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 23 '18 at 10:22









      ChrisChris

      709




      709
























          1 Answer
          1






          active

          oldest

          votes


















          2














          1. Use appSettings.json



          Version 3 of Microsoft.Azure.WebJobs is no longer configured with an app.config file, but with an appSettings.json file. Place it in the root of your app and make sure the "Copy to output directory" property of the appSettings.json file is set to either Copy if newer or Copy always, or add this to your .csproj file directly using Always or PreserveNewest:



          <Project ...> 
          ...
          <ItemGroup>
          <None Include="appSettings.json">
          <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
          </None>
          </ItemGroup>
          ...
          </Project>


          2. appSettings.json content



          Your appSettings.json file should have the Storage connection string:



          in development



          {
          "ConnectionStrings": {
          "AzureWebJobsStorage": "UseDevelopmentStorage=true"
          }
          }


          in production



          {
          "ConnectionStrings": {
          "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=key;..."
          }
          }


          See this .NET Core 2.1 sample host application for more info on configuring in version 3. Though it might be somewhat different than .NET Framework that you are using.






          share|improve this answer


























          • This solves my issue thanks, is the appSettings.json a .NET Core approach? Strange app.config has been removed.

            – Chris
            Nov 26 '18 at 9:21











          • This has to be the most helpful thing I've seen regarding configuring azure storage. how on earth did you stumble on this?

            – Marqueone
            Dec 25 '18 at 18:52











          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%2f53444823%2fazure-webjobs-sdk-and-emulator-triggers-not-working%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









          2














          1. Use appSettings.json



          Version 3 of Microsoft.Azure.WebJobs is no longer configured with an app.config file, but with an appSettings.json file. Place it in the root of your app and make sure the "Copy to output directory" property of the appSettings.json file is set to either Copy if newer or Copy always, or add this to your .csproj file directly using Always or PreserveNewest:



          <Project ...> 
          ...
          <ItemGroup>
          <None Include="appSettings.json">
          <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
          </None>
          </ItemGroup>
          ...
          </Project>


          2. appSettings.json content



          Your appSettings.json file should have the Storage connection string:



          in development



          {
          "ConnectionStrings": {
          "AzureWebJobsStorage": "UseDevelopmentStorage=true"
          }
          }


          in production



          {
          "ConnectionStrings": {
          "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=key;..."
          }
          }


          See this .NET Core 2.1 sample host application for more info on configuring in version 3. Though it might be somewhat different than .NET Framework that you are using.






          share|improve this answer


























          • This solves my issue thanks, is the appSettings.json a .NET Core approach? Strange app.config has been removed.

            – Chris
            Nov 26 '18 at 9:21











          • This has to be the most helpful thing I've seen regarding configuring azure storage. how on earth did you stumble on this?

            – Marqueone
            Dec 25 '18 at 18:52
















          2














          1. Use appSettings.json



          Version 3 of Microsoft.Azure.WebJobs is no longer configured with an app.config file, but with an appSettings.json file. Place it in the root of your app and make sure the "Copy to output directory" property of the appSettings.json file is set to either Copy if newer or Copy always, or add this to your .csproj file directly using Always or PreserveNewest:



          <Project ...> 
          ...
          <ItemGroup>
          <None Include="appSettings.json">
          <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
          </None>
          </ItemGroup>
          ...
          </Project>


          2. appSettings.json content



          Your appSettings.json file should have the Storage connection string:



          in development



          {
          "ConnectionStrings": {
          "AzureWebJobsStorage": "UseDevelopmentStorage=true"
          }
          }


          in production



          {
          "ConnectionStrings": {
          "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=key;..."
          }
          }


          See this .NET Core 2.1 sample host application for more info on configuring in version 3. Though it might be somewhat different than .NET Framework that you are using.






          share|improve this answer


























          • This solves my issue thanks, is the appSettings.json a .NET Core approach? Strange app.config has been removed.

            – Chris
            Nov 26 '18 at 9:21











          • This has to be the most helpful thing I've seen regarding configuring azure storage. how on earth did you stumble on this?

            – Marqueone
            Dec 25 '18 at 18:52














          2












          2








          2







          1. Use appSettings.json



          Version 3 of Microsoft.Azure.WebJobs is no longer configured with an app.config file, but with an appSettings.json file. Place it in the root of your app and make sure the "Copy to output directory" property of the appSettings.json file is set to either Copy if newer or Copy always, or add this to your .csproj file directly using Always or PreserveNewest:



          <Project ...> 
          ...
          <ItemGroup>
          <None Include="appSettings.json">
          <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
          </None>
          </ItemGroup>
          ...
          </Project>


          2. appSettings.json content



          Your appSettings.json file should have the Storage connection string:



          in development



          {
          "ConnectionStrings": {
          "AzureWebJobsStorage": "UseDevelopmentStorage=true"
          }
          }


          in production



          {
          "ConnectionStrings": {
          "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=key;..."
          }
          }


          See this .NET Core 2.1 sample host application for more info on configuring in version 3. Though it might be somewhat different than .NET Framework that you are using.






          share|improve this answer















          1. Use appSettings.json



          Version 3 of Microsoft.Azure.WebJobs is no longer configured with an app.config file, but with an appSettings.json file. Place it in the root of your app and make sure the "Copy to output directory" property of the appSettings.json file is set to either Copy if newer or Copy always, or add this to your .csproj file directly using Always or PreserveNewest:



          <Project ...> 
          ...
          <ItemGroup>
          <None Include="appSettings.json">
          <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
          </None>
          </ItemGroup>
          ...
          </Project>


          2. appSettings.json content



          Your appSettings.json file should have the Storage connection string:



          in development



          {
          "ConnectionStrings": {
          "AzureWebJobsStorage": "UseDevelopmentStorage=true"
          }
          }


          in production



          {
          "ConnectionStrings": {
          "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=key;..."
          }
          }


          See this .NET Core 2.1 sample host application for more info on configuring in version 3. Though it might be somewhat different than .NET Framework that you are using.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 26 '18 at 12:20









          Chris

          709




          709










          answered Nov 25 '18 at 20:59









          ArtemiousArtemious

          691519




          691519













          • This solves my issue thanks, is the appSettings.json a .NET Core approach? Strange app.config has been removed.

            – Chris
            Nov 26 '18 at 9:21











          • This has to be the most helpful thing I've seen regarding configuring azure storage. how on earth did you stumble on this?

            – Marqueone
            Dec 25 '18 at 18:52



















          • This solves my issue thanks, is the appSettings.json a .NET Core approach? Strange app.config has been removed.

            – Chris
            Nov 26 '18 at 9:21











          • This has to be the most helpful thing I've seen regarding configuring azure storage. how on earth did you stumble on this?

            – Marqueone
            Dec 25 '18 at 18:52

















          This solves my issue thanks, is the appSettings.json a .NET Core approach? Strange app.config has been removed.

          – Chris
          Nov 26 '18 at 9:21





          This solves my issue thanks, is the appSettings.json a .NET Core approach? Strange app.config has been removed.

          – Chris
          Nov 26 '18 at 9:21













          This has to be the most helpful thing I've seen regarding configuring azure storage. how on earth did you stumble on this?

          – Marqueone
          Dec 25 '18 at 18:52





          This has to be the most helpful thing I've seen regarding configuring azure storage. how on earth did you stumble on this?

          – Marqueone
          Dec 25 '18 at 18:52


















          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%2f53444823%2fazure-webjobs-sdk-and-emulator-triggers-not-working%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'