forked from SoDOff-Project/sodoff
fixes for avoid network error in client
- return 200 OK for /ContentWebService.asmx - return 404 (and log error) on connection error to asset provider server
This commit is contained in:
parent
d00a2f770c
commit
d1258b6082
@ -14,6 +14,7 @@ namespace sodoff.Controllers.Common
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Route("ping")]
|
[Route("ping")]
|
||||||
|
[Route("ContentWebService.asmx")] // ping URL used by SoD
|
||||||
public IActionResult Ping()
|
public IActionResult Ping()
|
||||||
{
|
{
|
||||||
return Ok();
|
return Ok();
|
||||||
|
@ -138,11 +138,12 @@ public class AssetMiddleware
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception) {
|
catch (Exception err) {
|
||||||
|
Console.WriteLine($"{err}");
|
||||||
if (File.Exists(filePathTmp))
|
if (File.Exists(filePathTmp))
|
||||||
File.Delete(filePathTmp);
|
File.Delete(filePathTmp);
|
||||||
if (!context.Response.HasStarted)
|
if (!context.Response.HasStarted)
|
||||||
context.Response.StatusCode = 502;
|
context.Response.StatusCode = 404;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user