0

I am converting HTML to pdf using NReco in azure functions. It used to work properly but when I deployed in another slot I am getting below error.

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

can I know what's happening in the above steps?

Jerry Liu
  • 17,282
  • 4
  • 40
  • 61
Praveen kumar
  • 225
  • 1
  • 6
  • 18
  • 1
    Can you please provide some code and some more details about your dependency NReco – Sebastian Achatz Nov 27 '18 at 08:51
  • Does your function app run on a dedicated app service plan(opposite to consumption plan), and is it v1 or v2? – Jerry Liu Nov 27 '18 at 09:22
  • my function runs on a basic plan. – Praveen kumar Nov 27 '18 at 20:54
  • I might make bit of confusion here. Please ignore NReco. Finally when my function completed execution. I am getting the below error. A ScriptHost error has occurred Microsoft.Azure.WebJobs.Host: Cannot access a disposed object. Can I know how i can solve this error. – Praveen kumar Nov 28 '18 at 17:34

1 Answers1

-1

You are trying to access the object host.json but it is disposed. In other words, not available.

This happens when the object is utilized by another process, so it is possible that you have another instance running, or holding up a reference. I recommend closing all your terminals to terminate all process.

For function app version 2, if you do not have a host.json file, it will automatically create one for you with the following content:

{
  "version":"2.0"
}
mugabits
  • 1,015
  • 1
  • 12
  • 22