使用VS运行“我的项目”,但使用IIS运行后显示“找不到此本地主机页面”

时间:2019-12-22 20:57:13

标签: c# asp.net-core

当我在VS中运行该项目时,它运行起来没有任何问题,但是在Internet信息服务中发布后,它显示:

  

“需要找到该本地主机页面”

我的操作代码如下:

string Date = DayDate.Date.ToShortDateString();
            var modelfoodname =db.FoodName.OrderByDescending(p => p.FN_ID).ToList();
            try
            {
                int FoodProgramID = modelFoodProgram[0].FP_ID;
                modelReserve = db.ReservedFood.Where(p => p.R_FP_ID == FoodProgramID).ToList();
                int ReserverID = modelReserve[0].R_ID;
                modelGeust = db.Geust.Where(p => p.G_RF_ID == ReserverID).ToList();
            }
            catch { }
            ViewModel Model = new ViewModel();
            Model.foodnameList = modelFoodName;
            return View(Model);

0 个答案:

没有答案