[英]Azure WebJobs Supported .Net Framework Version?
我有兩個單獨的Azure Web Apps,每個都有一個連續的webjob在運行。 將C#項目升級到4.6.1之后,我將站點發布到Azure,它們繼續像webjobs一樣工作。
我注意到配置在下面的調試版本中使用了不同的httpRuntime版本,因此我將其從
<system.web>
<compilation debug="true" targetFramework="4.6.1" />
<httpRuntime targetFramework="4.5.1" maxRequestLength="30720" />
...
</system.web>
至
<system.web>
<compilation debug="true" targetFramework="4.6.1" />
<httpRuntime targetFramework="4.6.1" maxRequestLength="30720" />
...
</system.web>
發布Web應用程序和相應的Web作業后,它們仍然可以工作。
但是從更改webjobs應用程序的配置后
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
</startup>
</configuration>
至
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>
每次我重新發布或停止並啟動時,兩個webjob都恢復為待處理的啟動狀態。 日志顯示錯誤
[02/12/2016 19:48:35 > 686340: SYS INFO] Detected WebJob file/s were updated, refreshing WebJob
[02/12/2016 19:48:35 > 686340: SYS INFO] Status changed to Stopping
[02/12/2016 19:48:35 > 686340: SYS INFO] Status changed to Stopped
[02/12/2016 19:48:35 > 686340: SYS INFO] Status changed to Starting
[02/12/2016 19:48:35 > 686340: SYS INFO] Run script 'Timbo.Azure.Worker.exe' with script host - 'WindowsScriptHost'
[02/12/2016 19:48:35 > 686340: SYS INFO] Status changed to Running
[02/12/2016 19:48:35 > 686340: SYS ERR ] Job failed due to exit code -2146232576
[02/12/2016 19:48:35 > 686340: SYS INFO] Process went down, waiting for 60 seconds
[02/12/2016 19:48:35 > 686340: SYS INFO] Status changed to PendingRestart
[02/12/2016 19:49:36 > 686340: SYS INFO] Run script 'Timbo.Azure.Worker.exe' with script host - 'WindowsScriptHost'
[02/12/2016 19:49:36 > 686340: SYS INFO] Status changed to Running
[02/12/2016 19:49:36 > 686340: SYS ERR ] Job failed due to exit code -2146232576
[02/12/2016 19:49:36 > 686340: SYS INFO] Process went down, waiting for 60 seconds
[02/12/2016 19:49:36 > 686340: SYS INFO] Status changed to PendingRestart
錯誤代碼-2146232576顯然沒有幫助,特別是因為我無法在google或此處找到任何內容來對付它。
還原此設置,所有操作將再次生效。 所以我的問題是為什么會發生這種情況,為什么在此設置下在本地運行(開發機器)運行的webjob起作用,但是在框架設置(在appsettings中)顯示.Net版本4.6的網站上的Azure上卻不起作用
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.