Reputation: 29
I am attempting to execute a .NET timedTrigger Azure Function through the Azure Portal, and I keep getting the following error:
"Microsoft.Azure.WebJobs.Host: Please verify that the Azure Storage Emulator is running. Microsoft.WindowsAzure.Storage: Unable to connect to the remote server. System: Unable to connect to the remote server. System: An attempt was made to access a socket in a way forbidden by its access permissions 127.0.0.1:10000."
I recently inherited this product, and there hadn't been a deployment in over a year. The function worked when I first tried it. I attempted to publish the project to the Azure function as is to make sure the deployment still worked, foolishly assuming the source code hadn't been changed since the last deployment. That is when the above error starting occurring.
I saw some other users get this error when using version 1.x of Microsoft.Azure.WebJobs, but my project is currently on 2.2.0. I tried upgrading it to latest to see if it would help, but then ran into dependency issues with Microsoft.NET.Sdk.Functions, which is on the latest version.
Any ideas on how to get past this?
Upvotes: 0
Views: 521
Reputation: 33738
It sounds like the wrong connectionstring is being used.
From the comments:
Don't you need to give it the connectionstring for Storage? I usually keep these separated for Debug and Release builds. Does your project do the same? Did you build the correct configuration? Have you verified your connectionstring? – Sam Axe
Connection string in AzureWebJobStorage setting is set to "UseDevelopmentStorage=true" . I'm assuming this needs to be updated to point to an actual storage account. – John Ramos
Sigh, that was the issue. Someone attempted to deploy the function with the configs found in localsettings.json file through an automated pipeline a few months back and never fixed it. Respond in an answer and I'll give you credit. @SamAxe – John Ramos
Upvotes: 1