I am following this tutorial that creates an Azure Function trigged by http with output to CosmosDB.
When I create just a simple Azure function it works ok, I trigge by http and the http response its ok.
But if create a new output to a ComosDB using the example code indicated in the tutorial the function returns "THIS AZURE FUNCTIONS APP IS DOWN FOR MAINTENANCE" when trigged.
Please be patience, until last week I was just a c++ programmer hahaha.
My steps:
Creating a CosmosDB account and a database called "testDb".
Creating a Function App:
When trigged using this code its ok.
Creating a CosmosDB output.
I change my code to this:
Now when I trigger by http the response is:
What am I doing wrong?
Grateful.
答案 0 :(得分:3)
有人报告了相同的issue。总结解决方案:在门户>平台功能> App Service编辑器中。右键单击protected void onSignalReceived(Session session, String type, String data, Connection connection) {
String myConnectionId = session.getConnection().getConnectionId();
if (connection != null && connection.getConnectionId().equals(myConnectionId)) {
// Signal received from another client
}
并删除。
在安装cosmosdb扩展名时,将生成此文件以停止功能应用程序。它应该在安装扩展名后自动删除,此功能似乎存在一些问题,可能与使用计划中的文件系统速度慢有关。
如果以后再次被困,请尝试关闭此行为,在您的应用中添加一个app_offline.htm
应用设置,并将其值设置为SCM_CREATE_APP_OFFLINE
,选中official announcement以获得该功能。