Click here to Skip to main content
15,891,841 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

C#
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

C#
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

C#
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
    {
        // GET: AllUsers/ListAreaCouncils

        private ACBll ACdb;

        public ListAreaCouncilsController()
        {
           ACdb = new ACBll();
        }
        public ActionResult Index()
        {
            var areaCouncils = ACdb.GetALL();
            return View(areaCouncils);
        }
    }
}


And finally, this view

HTML
@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%.
Posted
Updated 14-Aug-16 15:18pm
v2
Comments
Vjay Y 14-Sep-16 7:16am    
Can you show your connection string from web config

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900