我有一个应用服务运行它来自 Azure 门户的相应 ConnectionString。ConnectionString 指向 Azure SQL Server。
我有一个带有以下 appsettings.json 的 WebJob
{
"ConnectionStrings": {
"DefaultConnection": "Add your connection string"
}
}
当我运行 Web 作业时,它似乎没有从 azure 门户中提取连接字符串,但它使用了我在 appsettings.json 中的默认 ConnectionStrings。
[02/13/2017 08:45:27 > 2942c6: SYS INFO] Status changed to Initializing
[02/13/2017 08:45:27 > 2942c6: SYS INFO] Run script 'run.cmd' with script host - 'WindowsScriptHost'
[02/13/2017 08:45:27 > 2942c6: SYS INFO] Status changed to Running
[02/13/2017 08:45:27 > 2942c6: INFO]
[02/13/2017 08:45:27 > 2942c6: INFO] D:\local\Temp\jobs\triggered\TestConnectionString\32vmiek4.2av>dotnet TestConnectionString.dll
[02/13/2017 08:45:29 > 2942c6: INFO] Add your connection string