我正在尝试使用Visual Studio在本地运行Azure功能并执行定时触发器,我已在local.settings.json中设置此功能
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
但是当我运行它时,它有一个错误“无效的存储帐户'devstoreaccount1'。
我尝试启动模拟器(管理员,关闭防火墙),它有这个错误。默认安装,无需修改。
C:\Windows\system32>cd C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe init
Windows Azure Storage Emulator 5.2.0.0 command line tool
Found SQL Instance (localdb)\MSSQLLocalDB.
Creating database AzureStorageEmulatorDb52 on SQL instance '(localdb)\MSSQLLocalDB'.
Granting database access to user Robin-PC\Robin.
Database access for user Robin-PC\Robin was granted.
Initialization successful. The storage emulator is now ready for use.
The storage emulator was successfully initialized and is ready to use.
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe start
Windows Azure Storage Emulator 5.2.0.0 command line tool
Unhandled Exception: System.TimeoutException: Unable to open wait handle.
at Microsoft.WindowsAzure.Storage.Emulator.Controller.EmulatorProcessController.InternalWaitForStorageEmulator(Int32 timeoutInMilliseconds)
at Microsoft.WindowsAzure.Storage.Emulator.Controller.EmulatorProcessController.EnsureRunning(Int32 timeoutInMilliseconds)
at Microsoft.WindowsAzure.Storage.Emulator.Commands.StartCommand.RunCommand()
at Microsoft.WindowsAzure.Storage.Emulator.Program.Main(String[] args)
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>
答案 0 :(得分:1)
经过多次尝试,我设法找出原因。后台进程采用默认的10000端口。我按照这条指令找出了哪个进程并将其杀死,然后就可以了。
答案 1 :(得分:-1)
我有同样的问题,下面给出了我是如何解决这个问题的
这对我有用