I have this database on my local SQL server 2014
CREATE TABLE Dev.AreaCouncil
(
AreaCouncilID int PRIMARY KEY NOT NULL,
AreaCouncilName varchar(25) NOT NULL,
AreaCouncilDescription varchar(40)
I have this Data Access Layer
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BOL;
namespace DAL
{
public class AreaCon
{
private AfigyaKwabreEntities db;
public AreaCon()
{
db = new AfigyaKwabreEntities();
}
public IEnumerable<AreaCouncil> GetALL()
{
return db.AreaCouncils.ToList();
}
}
}
I have this Business Logic Layer
using BOL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public class ACBll
{
private ACBll ACdB;
public ACBll()
{
ACdB = new ACBll();
}
public IEnumerable<AreaCouncil> GetALL()
{
return ACdB.GetALL();
}
}
}
I have this controller
using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace AfigyaKwabre.Areas.AllUsers.Controllers
{
public class ListAreaCouncilsController : Controller
{
private ACBll ACdb;
public ListAreaCouncilsController()
{
ACdb = new ACBll();
}
public ActionResult Index()
{
var areaCouncils = ACdb.GetALL();
return View(areaCouncils);
}
}
}
And finally, this view
@model IEnumerable<BOL.AreaCouncil>
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.AreaCouncilName)
</th>
<th>
@Html.DisplayNameFor(model => model.AreaCouncilDescription)
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.AreaCouncilName)
</td>
<td>
@Html.DisplayFor(modelItem => item.AreaCouncilDescription)
</td>
</tr>
}
</table>
As soon as I try to use this part of application to list Area Councils, the localhost returns "No internet connection". The other parts of the application that have forms for input come up correctly but not this one. It goes offline until I restart.
Any ideas?
What I have tried:
I have gone through event logs, no clue..I have restarted database several times, still the same. I have tried different browsers, same. However, test connection in Visual studio succeeds. All parts of the application works. It goes offline immediately I try to retrieve database from the database by clicking on the menu item for this specific one
THIS IS THE ERROR MESSAGE AM CONSISTENTLY GETTING IN EVENT LOGS
A significant part of sql server process memory has been paged out.
This may result in a performance degradation. Duration: 333 seconds. Working set (KB): 53684, committed (KB): 111792, memory utilization: 48%.