Azure函数无法访问已处置的对象
我正在azure函数中使用NReco将HTML转换为pdf。它过去工作正常,但当我在另一个插槽中部署时,我得到了以下错误Azure函数无法访问已处置的对象,azure,azure-functions,azure-functions-runtime,azure-function-app-proxy,Azure,Azure Functions,Azure Functions Runtime,Azure Function App Proxy,我正在azure函数中使用NReco将HTML转换为pdf。它过去工作正常,但当我在另一个插槽中部署时,我得到了以下错误 Assembly reference changes detected. Restarting host... Environment shutdown has been triggered. Stopping host and signaling shutdown. completed successfully Function completed (Success, Id
Assembly reference changes detected. Restarting host...
Environment shutdown has been triggered. Stopping host and signaling shutdown.
completed successfully
Function completed (Success, Id=d5042f25-18d9-489a-81fe-05ae07607012, Duration=10921ms)
Executed 'AzureBillFunc' (Succeeded, Id=d5042f25-18d9-489a-81fe-05ae07607012)
The host started (12276ms)
A ScriptHost error has occurred
Microsoft.Azure.WebJobs.Host: Cannot access a disposed of object. Stopping Host
我能知道在上述步骤中发生了什么吗 您正试图访问对象
host.json
,但它已被释放。换句话说,不可用
当对象被另一个进程使用时,就会发生这种情况,因此可能有另一个实例正在运行,或者挂起引用。我建议关闭所有终端以终止所有进程
对于功能应用程序版本2,如果您没有host.json
文件,它将自动为您创建一个包含以下内容的文件:
{
"version":"2.0"
}
你能提供一些代码和更多关于你的依赖关系的详细信息吗?你的功能应用程序运行在一个专用的应用程序服务计划(与消费计划相反)上,是v1还是v2?我的功能运行在一个基本计划上。我在这里可能会有点混淆。请忽略NReco。最后,当我的函数完成执行时。我得到下面的错误。发生ScriptHost错误Microsoft.Azure.WebJobs.Host:无法访问已释放的对象。我能知道如何解决这个错误吗?很抱歉反应太晚。我正在使用版本:1。你是在推荐我试试第二版吗?