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

LoadOnDemand not working on IIS7

4 Answers 176 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 23 Apr 2009, 02:12 AM
Hi,
I am using the LoadOnDemand feature of the RadComboBox. It has been working on the VS development server and IIS6 but is not working after migrating to IIS7 in Classic mode.

When I type into the combo box a Javascript alert pops up with the message "The server method "LoadDropDown" failed".

My combo box is created like this:
var combobox = new RadComboBox 
                { 
                    WebServiceSettings = { Path = "~/Services/MyWebService.asmx"Method = "LoadDropDown" }, 
                    EnableLoadOnDemand = true
                    MarkFirstMatch = true
                    AllowCustomText = true
                    ShowDropDownOnTextboxClick = false
                    ID = "rcb"
                    MaxLength = 255
                    EnableEmbeddedSkins = false 
                }; 

The application is running in a pool using the classic mode, not Integrated pipeline mode.
In IIS7, the handler mappings have *.asmx paths mapped to  the handler IsapiModule.
According to some stuff on the web this could be a permissions error but I have tried giving full permissions to Network Service and it does not work.

All other AJAX requests are working fine.

In the web.config I have:
<httpHandlers> 
    <remove path="*.asmx" verb="*" /> 
    <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" /> 
     etc... 

My asmx file's code looks like this:
namespace MyWebsite.Services 
 
[WebService] 
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] 
[ToolboxItem(false)] 
[ScriptService] 
public class MyWebService : WebService 
 
    [WebMethod] 
    public RadComboBoxItemData[] LoadDropDown(object context) 
    { 
    var currentData = (IDictionary<stringobject>)context; 
        var currentText = (string)currentData["Text"]; 
 
        var result = new List<RadComboBoxItemData>(); 
        etc. 
        etc. 
        return result.ToArray(); 
     } 
 

Hope you can help

4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 23 Apr 2009, 06:28 AM
Hi Andrew,

Have you tried replacing the type of the context with RadComboBoxContext?

We have tested similar setups but without any issues. I suggest you open a support ticket and send us over a runnable subset of your project so we can troubleshoot locally. Thanks.

Regards,
Albert
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
DheepaB
Top achievements
Rank 1
answered on 06 Aug 2009, 05:42 PM
Was this ever solved, I get the same error

<

 

telerik:RadComboBox ID="ddlMatter" runat="server"

 

 

Width="350" TabIndex="2" EnableLoadOnDemand="true" >

 

 

<WebServiceSettings Path="ClientMatter.asmx" Method="GetMatters" />

 

 

</telerik:RadComboBox>


 

[

WebService(Namespace = "http://tempuri.org/")]

 

[

WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

 

 

// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.

 

 

 

 

[System.Web.Script.Services.

ScriptService]

 

 

public class ClientMatter : System.Web.Services.WebService

 

 

 

 

{

[

WebMethod]

 

 

public IEnumerable GetMatters(object context)

 

{

 

using (var ctx = new TaskDataContext())

 

{

 

var items = (from matter in ctx.Matters

 

 

where matter.ClientCode == "089999"

 

 

 

 

 

orderby matter.MatterCode

 

 

select new

 

 

 

 

{

MatterCode = matter.MatterCode,

MatterName = matter.MatterCode +

"-" + matter.MatterName

 

}).ToList();

 

return items;

 

}

}

0
Joe
Top achievements
Rank 1
answered on 21 Jul 2011, 01:41 PM
nevermind.
0
Michael
Top achievements
Rank 2
answered on 13 Jan 2012, 08:13 AM
I was having the same "The server method XYZ failed." error as the web service populating the ComboBox is called.

I tried debugging with FireBug and the server response for the .asmx file is 404 Object Not Found. The project was working fine on my local test environment, but it is not working on our productive web server environment.

The called URI is: http://www.xyz.at/admin/index_red/veranstaltungen/sa_veranstaltung_slideshows_service.asmx/GetSlideshows

We use ELMAH for error handling and I found the following error in the log file of ELMAH:

Source: System.Web.Services
Type: System.InvalidOperationException
Message: Request format is unrecognized for URL unexpectedly ending in '/GetSlideshows'.

I found this solution for the problem of accesing the web service: http://stackoverflow.com/questions/657313/request-format-is-unrecognized-for-url-unexpectedly-ending-in

After this the web service was still not working. The same error in FireBug: 404 but the response body has changed. The web service was blocked by our application firewall which was filtering the HTTP content-type application/json that is used while calling the web service.

HTH
Tags
ComboBox
Asked by
Andrew
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
DheepaB
Top achievements
Rank 1
Joe
Top achievements
Rank 1
Michael
Top achievements
Rank 2
Share this question
or