Error when hosting our asp.net core MVC inside bluehost '403 Forbidden error was encountered while trying to use an ErrorDocument to handle the req'
I am working on an asp.net core MVC 3.1. and inside visual studio i can access the home page of the website as follow:-
This is the code for the index method:-
public IActionResult Index()
{
return View();
}
and the view:-
@{
ViewData["Title"] = "Home Page";
}
<html>
<head>
<title class="text-center"></title>
</head>
<body>
<div class="text-center">
<a href="~/file/CV.pdf">Click to view my CV</a></div>
</body>
</html>
and when i click on the link a pdf will be shown inside the browser. now i published the website inside a folder and i used FileZilla to upload the files to the bluehost file-manager as follow:-
but when i access the website http://www.ourcompany.com, i will get this error:-
and if i try to access the pdf file directly using http://www.ourcompany.com/file/cv.pdf, i will get this error:-
any advice?