core3.1 ApplicationStopped 唤醒站点报503

由于把Core3.1网站部署到IIS,会存在网站回收导致挂载在网站定时任务也停止了。
所以在 Startup里面注册 ApplicationStopped事件,事件里面访问站点,唤醒站点。
但是不知道为啥报 503.求解!

回答

问题补充:

Exception=System.Net.WebException: The remote server returned an error: (503) Service Unavailable.
at System.Net.HttpWebRequest.GetResponse()
at HY.Service.Http.APIHelper.Get(String apiUrl, Dictionary`2 headers) in D:\Project\BHQ\HY.Service\Http\APIHelper.cs:line 80
Url:http://localhost:5001/

以上是core3.1 ApplicationStopped 唤醒站点报503的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>