Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jquery/Ajax call fails when Authentication cookies is timeout #668

Open
devamirsaleem opened this issue Feb 21, 2023 · 0 comments
Open

jquery/Ajax call fails when Authentication cookies is timeout #668

devamirsaleem opened this issue Feb 21, 2023 · 0 comments

Comments

@devamirsaleem
Copy link

Hi,

I am using Azure Ad authentication in my ASP.Net 4.8 MVC application. When authentication is expired and when user clicks on the link or button user get redirected to login page. So that is good.

However, I have a problem with AutoComplete textbox which is also available on the same page among buttons and link. If user leave the app open and comes back after page authentication cookie is expired and enter a value in autocomplete textbox, then textbox doesn't do anything, it behaves as if user did type space. There is no redirection or even a error message.
This only happens when authentication is expired which is usually around 60 minutes.

When I debug the code I found that when user clicks enter the value in the textbox then call is made to to controller and controller get created. After code leave the constructor then nothing happens. No error and no finding where does the code ended.

Any help please.

Just in case if the code is needed so here it is.

                @{
                    try
                    {
                        @(Html.Kendo().AutoComplete()
                .Name("searchValue")  //chaninging the name of the class to UserModel
                .DataTextField("SearchString") //DataTextField("dataField")
                .Filter("contains")
                .MinLength(2)

                .HtmlAttributes(new {style = "width:100%"})
                .DataSource(source =>
                {
                    source.Read(read =>
                    {

                        read.Action("GetAutoComplete", "Job")
                            .Data("onAdditionalData");
                    })
                        .ServerFiltering(true);
                })
                //.Events(e => e.DataBound("onDataBound"))
                )

                    }
                    catch (Exception e)
                    {
                        //this.RedirectToAction("Reporting", "ReportManagement");
                    }

                }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants