We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Configuring ASPNET Web Form

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



5 Replies

TO Tomasz August 4, 2017 01:42 PM UTC

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.



TO Tomasz August 7, 2017 12:46 PM UTC

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




MS Mani Sankar Durai Syncfusion Team August 8, 2017 12:39 PM UTC

Hi Tomasz, 

Thanks for contacting Syncfusion support. 

Query 1: But in project with individual user authentication or windows authentication, I received info "Stack Empty" or about circular reference 
 
   We have analyzed your query and based on this we have already explained in our Syncfusion Knowledge based to resolve this. The Kb link will be available from the below link. 
Query 2: For example, to use File Explorer I need to change in RouteConfig redirect mode to Off. 
              When set the “settings.AutoRedirectMode” as “RedirectMode.Permanent” or “RedirectMode.Temporary”, it will restricted from browsers for security purposes and raise the authentication error. For this purpose only, we need to set “settings. AutoRedirectMode” as “Off”.  
 
Please let us know if you need further assistance 
 
Regards, 
Manisankar Durai. 



TO Tomasz August 8, 2017 01:50 PM UTC

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



MS Mani Sankar Durai Syncfusion Team August 9, 2017 12:21 PM UTC

Hi Tomasz, 

We are happy to hear that your problem has been solved 

Please let us know if you need further assistance 

Regards, 
Manisankar Durai. 


Loader.
Up arrow icon