I am currently hosted on the MVC 3 website, which uses Entity Framework 4.3 to access the database.
The application works as expected on the Visual Studio development server, but after it is deployed to a remote server, the request unexpectedly responds to
It should display a sorted list and pages through this sorted data
I tried restarting the web server and the physical server to make sure the cache was gone and even tried to use a clean IIS site on the remote server with the same result.
[Edit]: I also did a complete removal and republish to a clean site as well
In the development of the machine

On a remote server

The code I use to generate the tables is:
controller
[HttpGet] public virtual ActionResult Index(string filter = "", int? page = null) { page = page ?? 1; filter = filter.Trim().ToLower(); int pageSize = Properties.Settings.Default.DefaultSPPageSize; int skipNum = (page.Value - 1) * pageSize; IQueryable<SamplePoint> spList; var points = new HashSet<string>(Settings.Default.SamplePointFilter.Split(',')); if (filter != "") spList = db.SamplePoints.Where(e=> points.Any(p=> e.Id.StartsWith(p)) && e.Id.ToLower().Trim().StartsWith(filter.ToLower())) .OrderBy(o => o.Id); else spList = db.SamplePoints.Where(e => points.Any(p => e.Id.StartsWith(p)) && e.Id.Trim().StartsWith(filter)).OrderBy(o => o.Id); List<SamplePoint> pageItems; if (page != 0) { pageItems = spList.Skip(skipNum).Take(pageSize).ToList(); } else { pageItems = spList.OrderBy(o=> o.Id).ToList(); } int _totPages = Convert.ToInt32(pageSize > 0 ? Math.Ceiling(((double)spList.Count() / (double)pageSize)) : 0); var vModel = new SamplePointListViewModel(pageItems, filter) { LocationList = FilterListItems, TotalPages = _totPages, CurrentPage = page.Value }; return View(this.IsExcelRequest() ? MVC.Reports.Views.Excel.SamplePointList : MVC.Reports.Views.SamplePointList, vModel); }
source share