Hello
I am using a web service like the demo to populate the items in the RadComboBox on demand. This is all working find when i am running the program through VS2010 but is failing when I try through IIS.
Also it works for Http and does not work for Https so I think the solution lies there somewhere.
Here is my .aspx:
this is the svc method:
and this is the webconfig:
What am I doing wrong? Thanks
I am using a web service like the demo to populate the items in the RadComboBox on demand. This is all working find when i am running the program through VS2010 but is failing when I try through IIS.
Also it works for Http and does not work for Https so I think the solution lies there somewhere.
Here is my .aspx:
<
telerik:RadComboBox
AutoPostBack
=
"true"
ID
=
"txtGelPackProdCode"
runat
=
"server"
EnableLoadOnDemand
=
"true"
ShowMoreResultsBox
=
"true"
EnableVirtualScrolling
=
"true"
EmptyMessage
=
"Enter here..."
onselectedindexchanged
=
"txtGelPackProdCode_SelectedIndexChanged"
>
<
WebServiceSettings
Path
=
"MasterFormulaWebService.svc"
Method
=
"LoadProductData"
/>
</
telerik:RadComboBox
>
this is the svc method:
public RadComboBoxData LoadProductData(RadComboBoxContext context)
{
string text = context.Text.Trim() + '%';
DataTable data = ProductDAO.ViewData2(text, "RadCombo");
List<
RadComboBoxItemData
> result = new List<
RadComboBoxItemData
>(context.NumberOfItems);
RadComboBoxData comboData = new RadComboBoxData();
try
{
int itemsPerRequest = 10;
int itemOffset = context.NumberOfItems;
int endOffset = itemOffset + itemsPerRequest;
if (endOffset > data.Rows.Count)
{
endOffset = data.Rows.Count;
}
if (endOffset == data.Rows.Count)
{
comboData.EndOfItems = true;
}
else
{
comboData.EndOfItems = false;
}
result = new List<
RadComboBoxItemData
>(endOffset - itemOffset);
for (int i = itemOffset; i <
endOffset
; i++)
{
RadComboBoxItemData
itemData
=
new
RadComboBoxItemData();
itemData.Text
=
data
.Rows[i]["prod_code"].ToString().Trim();
itemData.Value
=
data
.Rows[i]["name"].ToString().Trim();
result.Add(itemData);
}
if (data.Rows.Count > 0)
{
comboData.Message = String.Format("Items <
b
>1</
b
>-<
b
>{0}</
b
> out of <
b
>{1}</
b
>", endOffset.ToString(), data.Rows.Count.ToString());
}
else
{
comboData.Message = "No matches";
}
}
catch (Exception e)
{
comboData.Message = e.Message;
}
comboData.Items = result.ToArray();
return comboData;
}
and this is the webconfig:
<
system.serviceModel
>
<
behaviors
>
<
endpointBehaviors
>
<
behavior
name
=
"Reena.Master.MasterFormulaWebServiceAspNetAjaxBehavior"
>
<
enableWebScript
/>
</
behavior
>
</
endpointBehaviors
>
</
behaviors
>
<
serviceHostingEnvironment
aspNetCompatibilityEnabled
=
"true"
multipleSiteBindingsEnabled
=
"true"
/>
<
services
>
<
service
name
=
"Reena.Master.MasterFormulaWebService"
>
<
endpoint
address
=
""
behaviorConfiguration
=
"Reena.Master.MasterFormulaWebServiceAspNetAjaxBehavior"
binding
=
"webHttpBinding"
contract
=
"Reena.Master.MasterFormulaWebService"
/>
</
service
>
</
services
>
<
bindings
>
<
webHttpBinding
>
<
binding
name
=
"webBinding"
>
<
security
mode
=
"None"
>
</
security
>
</
binding
>
</
webHttpBinding
>
</
bindings
>
</
system.serviceModel
>
What am I doing wrong? Thanks