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

invalid web service call, missing value for parameter: 'context'

4 Answers 276 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Lucian Duma
Top achievements
Rank 1
Lucian Duma asked on 09 Jun 2009, 09:00 AM
Hi guys,
We're encountering a very strange issue with RadComboBox. The Telerik.Web.UI version used is RadControls for ASPNET AJAX Q3 2008.
Using IE7, when getting the items from a WebService, we get the following error:

invalid web service call, missing value for parameter: 'context'.

The RadComboBox is added at runtime, in the following manner:
RadComboBox ddlPublisher = new RadComboBox(); 
tdPublisher.Controls.Add(ddlPublisher); 
 
ddlPublisher.ID = "ddlPublisher"
ddlPublisher.Width = Unit.Pixel(200); 
ddlPublisher.EnableLoadOnDemand = true
//ddlPublisher.ExpandEffect = RadComboBoxExpandEffect.Fade; 
ddlPublisher.ItemRequestTimeout = 500; 
ddlPublisher.OnClientDropDownOpening = "ddlRad_OnClientDropDownOpening"
ddlPublisher.OnClientSelectedIndexChanged = "ddlPublisher_SelectedIndexChanged"
ddlPublisher.WebServiceSettings.Method = "GetCompanies"
ddlPublisher.WebServiceSettings.Path = "~/WebService/Company.asmx"
ddlPublisher.MarkFirstMatch = true
ddlPublisher.EnableViewState = false
 
if (!row.IsPUBLISHER_IDNull()) { 
    ddlPublisher.Text = row.PUBLISHER_DESCR; 
    ddlPublisher.SelectedValue = row.PUBLISHER_ID.ToString(); 

The webservice that feeds the combobox is implemented in the following manner:
[WebMethod(EnableSession=true)] 
public RadComboBoxItemData[] GetCompanies(object context) { 
     
    IDictionary<stringobject> contextDictionary = (IDictionary<stringobject>)context; 
    List<RadComboBoxItemData> result = new List<RadComboBoxItemData>(); 
    RadComboBoxItemData itemData; 
 
    //get the search string from the combo 
    string searchText = contextDictionary["Text"].ToString(); 
    if (searchText.Length < 3) { 
        return result.ToArray(); 
    } 
 
    //.. db call to retrieve companies, and put them into the result array 
 
 
    return result.ToArray(); 


What is strange is that the failure happens only on the production machine. I cannot reproduce it on my dev machine (therefore I cannot send you a project that shows the problem :( ). Even more stranger is that the problem doesn't appear on FF or Chrome, only on IE (7&8, did not test it in 6). I tried to reproduce it on my dev machine by changing the Anonymous access on / off (the application uses Integrated Windows Authentication), with no luck.

Another thing to note is that once I open Fiddler to see what is going on, the ws call for the items works as expected. The request works with Fiddler opened! Once I close Fiddler, bang!, the error message reapears.

I'm sure that this problem is hard to reproduce, but i'm almost sure that this has to do with the server configuration: Here is some data:

Win2003, iis6
Integrated Windows Authentication
ASPNET 2.0
App runs as site, not as virtual directory.

Because this happens on prod machine, every help that comes ASAP is much apreciated.
Thank you in advance.

Lucian

4 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 09 Jun 2009, 12:34 PM
Hello Lucian Duma,

As a beginning can you please send us the live url so we can test it from here?

Best wishes,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Lucian Duma
Top achievements
Rank 1
answered on 10 Jun 2009, 06:50 AM
Hello,
Unfortunately, the app is internal and it's not live on internet.
0
Lucian Duma
Top achievements
Rank 1
answered on 10 Jun 2009, 07:57 AM
Ok, according to this post, it looks that it has to do with the anonymous authentication. I've enabled anonymous access together with Integrated authentication, and the problem is fixed, but I do not have an explanation of what is happening...
Thanks anyway!


0
Piyush Bhatt
Top achievements
Rank 2
answered on 23 Feb 2010, 08:11 PM
I was having similar issue with RadTreeNodeData - I observed that the web-service method name has to have the same parameter name [node]. If you change this name then this error occurs.

Tags
ComboBox
Asked by
Lucian Duma
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Lucian Duma
Top achievements
Rank 1
Piyush Bhatt
Top achievements
Rank 2
Share this question
or