Azure WebJobs 支持的 .Net Framework 版本?
Azure WebJobs Supported .Net Framework Version?
我有两个独立的 Azure Web 应用程序,每个应用程序都有一个连续的网络作业 运行。将 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>
发布网络应用程序和各自的网络作业后,它们仍然有效。
但是在将 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>
每次我重新发布或停止并启动时,两个 Web 作业都会恢复到待启动状态。日志显示错误
[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
的网站中却不能运行
更新:4.6.1 现已部署
Web 应用虚拟机尚不支持 4.6.1:
我有两个独立的 Azure Web 应用程序,每个应用程序都有一个连续的网络作业 运行。将 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>
发布网络应用程序和各自的网络作业后,它们仍然有效。
但是在将 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>
每次我重新发布或停止并启动时,两个 Web 作业都会恢复到待启动状态。日志显示错误
[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
的网站中却不能运行更新:4.6.1 现已部署
Web 应用虚拟机尚不支持 4.6.1: