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.
Unfortunately, activation email could not send to your email. Please try again.

Configuring ASPNET Web Form

Thread ID:

Created:

Updated:

Platform:

Replies:

131978 Aug 4,2017 06:30 AM Aug 9,2017 08:21 AM ASP.NET Web Forms 5
loading
Tags: Grid
Tomasz
Asked On August 4, 2017 06:30 AM

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



Tomasz
Replied On August 4, 2017 09:42 AM

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.


Tomasz
Replied On August 7, 2017 08:46 AM

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



Mani Sankar Durai [Syncfusion]
Replied On August 8, 2017 08:39 AM

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. 


Tomasz
Replied On August 8, 2017 09:50 AM

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


Mani Sankar Durai [Syncfusion]
Replied On August 9, 2017 08:21 AM

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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;