我在本地尝试并测试了我的代码,一切正常。
但是当我将其托管在Azure Function应用上时,出现以下错误。
<h1> HTTP Error 500.30 - ANCM In-Process Start Failure </h1>
<h2> Common causes of this issue: </h2>
<ul>
<li> The application failed to start </li>
<li> The application started but then stopped </li>
<li> The application started but threw an exception during startup </li>
</ul>
<h2> Troubleshooting steps: </h2>
<ul>
<li> Check the system event log for error messages </li>
<li> Enable logging the application process' stdout messages </li>
<li> Attach a debugger to the application process and inspect </li>
</ul>
无法理解可能是什么问题? 日志中也没有任何详细信息。
简单的HttpTrigget azure函数,每隔3分钟就会从Logic应用程序中调用一次。
string response = await new StreamReader(req.Body).ReadToEndAsync();
var myclassobj = new JsonSerializerSettings();
myclassobj.mapping = new MappingClass();
//map API JSON response to C# object
MyClass.data details = Newtonsoft.Json.JsonConvert.DeserializeObject<MyClass.data>(response, myclassobj);
var jsonstring = Newtonsoft.Json.JsonConvert.SerializeObject(details);
return new OkObjectResult(jsonstring);