My Azure Time trigger function
public async Task Run([TimerTrigger("0 */5 * * * *")] TimerInfo myTimer, ILogger log)
{
try
{
log.LogInformation("C# HTTP trigger function processed a request.");
}
}
- I have clean %Temp% and Temp folder.
- Restarted my machine.
- StorageEmulator is runnig
- I have Change port in
"StorageEmulatorConfig"
From
<StorageEmulatorConfig>
<services>
<service name="Blob" url="http://127.0.0.1:10000/"/>
<service name="Queue" url="http://127.0.0.1:10001/"/>
<service name="Table" url="http://127.0.0.1:10002/"/>
</services>
To
<StorageEmulatorConfig>
<services>
<service name="Blob" url="http://127.0.0.1:30001/"/>
<service name="Queue" url="http://127.0.0.1:30002/"/>
<service name="Table" url="http://127.0.0.1:30003/"/>
</services>
CodePudding user response:
Since you have specified different ports from the default, the connection string UseDevelopmentStorage=True
will not work.
You will instead have to specify the full connection string manually in local.settings.json:
{
"Values": {
"AzureWebJobsStorage": "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:30001/devstoreaccount1;QueueEndpoint=http://127.0.0.1:30002/devstoreaccount1;TableEndpoint=http://127.0.0.1:30003/devstoreaccount1;"
}
}
CodePudding user response:
In addition to what juunas suggested, make sure azurite is running on your computer. If you are running it integrated from Visual studio you should find in the Output window by showing output from "Service Dependencies". Otherwise you can also run it from PowerShell or the VS Code extension.