Попытка доступа к файлу по пути - wwwroot/templates/file.txt.
Следующий фрагмент кода работает для меня, вы можете обратиться к нему.
var filepath = Path.Combine(_hostingEnvironment.ContentRootPath, "templates", "file.txt");
var mes = "test message";
if (System.IO.File.Exists(filepath))
{
using (StreamReader file = new StreamReader(filepath))
{
mes = file.ReadLine();
}
}
ViewBag.fp = filepath;
ViewBag.mes = mes;
return View();
И, пожалуйста, убедитесь, что файл действительно существует в этой папке на вашем сервере.

Результат теста
