This is a migrated thread and some comments may be shown as answers.

Load-On-Demand: 'Authentication Failed'

12 Answers 222 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 1
Brad asked on 13 Oct 2010, 04:23 PM
I have a RadComboBox following the Load-on-demand PageMethod example. http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx

I am getting an alert with the message 'Authentication Failed' when I click the drop down. The RadComboBox happens to be in a RadGrid and I tried calling the same method on the RadGrid DataItemBound event and the method completed successfully (removing any question of database connectivity issues).

<telerik:RadComboBox ID="uxService" runat="server" DropDownWidth="175px" EmptyMessage="Service:" Height="150px" Width="100px" EnableLoadOnDemand="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true" OnClientBlur="dropDownBlur">
   <WebServiceSettings Method="GetServices" Path="TimeCard.ascx" />
</telerik:RadComboBox>

[WebMethod]
public static RadComboBoxData GetServices(RadComboBoxContext context)
{
    DataView data = Website.BlueSkyFactory.Time.GetServices(context.Text + "%");
    RadComboBoxData serviceData = new RadComboBoxData();
    int itemOffset = context.NumberOfItems;
    int endOffset = Math.Min(itemOffset + ItemsPerRequest, data.Count);
    serviceData.EndOfItems = endOffset == data.Count;
    List<RadComboBoxItemData> result = new List<RadComboBoxItemData>(endOffset - itemOffset);
    RadComboBoxItemData itemData;
    for (int i = itemOffset; i < endOffset; i++)
    {
        itemData = new RadComboBoxItemData();
        itemData.Text = data[i]["FriendlyName"].ToString();
        itemData.Value = data[i]["ServiceId"].ToString();
        result.Add(itemData);
    }
    serviceData.Message = GetStatusMessage(endOffset, data.Count);
    serviceData.Items = result.ToArray();
    return serviceData;
}

Please advise.

12 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 14 Oct 2010, 11:26 AM
Hello Brad,

Please put a debugger breakpoint in the GetServices method and step through all of the lines to see whether an exception is thrown.

Greetings,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Brad
Top achievements
Rank 1
answered on 14 Oct 2010, 02:04 PM
I did this and as I stated, the initial run through it works. When I click the dropdown, however, the breakpoint is not hit. I have worked around the issue for now by using the ItemsRequested event, but I think I'd rather avoid the post-back.
0
Simon
Telerik team
answered on 19 Oct 2010, 04:23 PM
Hi Brad,

Searching in Google for 'authentication failed page method' yields many results, one of which suggests enabling of the Session in the WebMethod attribute, e.g.
[WebMethod(Session=true)]

Does this help?

All the best,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jason Marshall
Top achievements
Rank 1
answered on 17 Feb 2011, 11:31 PM
I have same issue. I am using Forms Auth, and my session timeout is set at 120 minutes. However after 15 minutes of inactivity, the AJAX load-on-demain radcombobox gives me a messagebox: 'Authentication Failed' when you type something in it.

I see how you can catch this error, but i want to AVOID it altogether.
I tried to doing a session keep-alive to fire every 5 minutes, but this still occurs. Please help! How can I get the load-on-demand to respect session timeout? 
thanks
Jason
0
Simon
Telerik team
answered on 01 Mar 2011, 10:45 AM
Hello Jason Marshall,

Can you reproduce this each time in a new and simple project? Additionally, what is the type of Load On Demand you are using - server-side or WebService?

All the best,
Simon
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Eric
Top achievements
Rank 2
answered on 16 Mar 2011, 07:44 PM
I was able to fix this problem by adding the   [ScriptService]  tag to the class.
0
Dan
Top achievements
Rank 1
answered on 07 Dec 2011, 09:53 PM
I am getting the same "Authentication failed." error while using the control via a webservice.  The webservice class is designated with [ScriptService] and the method has the Session=true attribute set as well.  It is a fairly complicated session scenario, and I think that an expired session is the source of that error, but I was wondering how one might go about catching that error and redirecting the user.  Thanks for your help.
0
Simon
Telerik team
answered on 12 Dec 2011, 12:56 PM
Hello Daniel,

Do you have authentication and authorization enabled in your web site? If yes, please verify that you have granted proper access to the web service.

All the best,
Simon
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Dan
Top achievements
Rank 1
answered on 12 Dec 2011, 02:18 PM
Yes, I have the authorization and authentication set up correctly.  I should have said that I only get this issue intermittently, so that is why I wanted to know how to catch that error.
0
Simon
Telerik team
answered on 12 Dec 2011, 02:47 PM
Hello Daniel,

The most straightforward way to troubleshoot such issues is to inspect the IIS logs for more details on the exception and the error code.

Kind regards,
Simon
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Nazme
Top achievements
Rank 1
answered on 16 Sep 2013, 02:29 PM

Hi Simon,

I have the same issue which I get intermittently. I have set authentication and authorization in web.config. Still I get an alert with “authentication failed”. I could not solve this problem for more than 3 weeks. Could you please help me? Thanks.

Nazme

0
Nencho
Telerik team
answered on 19 Sep 2013, 08:26 AM
Hello Nazme,

I noticed that you had submitted a support ticket regarding the same issue. Therefore, I would suggest you to continue the conversation in the other ticket, in order to avoid duplication.

Regards,
Nencho
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
ComboBox
Asked by
Brad
Top achievements
Rank 1
Answers by
Simon
Telerik team
Brad
Top achievements
Rank 1
Jason Marshall
Top achievements
Rank 1
Eric
Top achievements
Rank 2
Dan
Top achievements
Rank 1
Nazme
Top achievements
Rank 1
Nencho
Telerik team
Share this question
or