In
last few days I try to force the visual studio project to work with some of the
components in the application. Below I write what I have discovered.
1.
Create ASP NET Web Application
2.
Using Nuget, Update all scripts, references. etc.
3.
Using Nuget Syncfusion Install Syncfusion ASP NET package
4. Remove all scripts from script references and add scripts to head Site in this manner
<link rel='nofollow' href="Content/ej/web/default-theme/ej.web.all.min.css" rel="stylesheet" />
<script src="Scripts/jquery-3.1.1.min.js"></script>
<script src="Scripts/jsrender.min.js"></script>
<script src="Scripts/ej/web/ej.web.all.min.js"></script>
<script src="Scripts/bootstrap.min.js"></script>
5.
Create simple DataBase
6.
Create model using ADO.NET Entity Model
7.
Add Grid to webpage
8. Add code to display data on grid
public void DoGrid()
{
var qu = db.cattbs.ToList(); ;
Grid1.DataSource = qu;
Grid1.DataBind();
}
and
if I have project without authentication everything work fine, but in project
with individual user authentication or windows authentication , I received info
"Stack Empty" or about circular refe.. something.
But changing little query
public void DoGrid()
{
var qu = db.cattbs.Select(x => new { x.category }).ToList();
Grid1.DataSource = qu;
Grid1.DataBind();
}
Work good.
I would like to understand that it causes these errors and
find a solution, perhaps modifying, I think, it is, some class or script of
Owin.
For example, to use File Explorer I need to change in RouteConfig redirect mode to Off.
Maybe in another place (class) do some change this conflict disappear
Thank a lot
Tomasz
I find where is the problem nothing what i write early. EntityFramework (Linq) work good when I connect project with external database, with database created in project directly i receive info "Stack Empty" but removing all relation between tables in local DataBase and add relation directly in model with limation, problem disappears.
One update if tabel have more like one relation
var qu = _db.RoomTypes.ToList();
Grid1.DataSource = qu;
Grid1.DataBind();
I recibe info about
A circular reference was detected while serializing an object of type
Using SqlCommand work fine
Hi Mani Sankar
Thank You for You reaply, one my fault i use ADO.Net Entity Data Model.
But I test solution from You Link, and result is ok with litle change.
I Select Entity (not association) and change Access to internal.
And code for dispaly data in grid is like below.
public IEnumerable GetRoomtype()
{
IEnumerable data = _db.RoomTypes.ToList();
return data;
}
Thank You for You Help
Tomasz