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

error 405 method not allowed

1 Answer 260 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 1
Charles asked on 09 Nov 2012, 02:22 PM
I have a RadComboBox control (actually, a few of them) in a RadGrid. The RacComboBox controls are configured for load on demand.

They work as expected so long as I have the service code located in a folder within my web app, but as soon as I try to use a separate WCF service application or a separate web application with the ASP.NET Ajax-enabled svc file, I get "error 405 method not allowed" as the response.

Here's the configuration section for my service from the service's application:

<system.serviceModel>
  <bindings>
    <webHttpBinding>
      <binding name="webHttpBindingConfiguration" maxBufferSize="2147483647"
        maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
        <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
          maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      </binding>
    </webHttpBinding>
  </bindings>
  <client>
    <endpoint address="http://localhost:21415/MDMStyleCreateBusinessSvc/MDMBusinessService.svc"
      binding="basicHttpBinding" bindingConfiguration="basicHttpBusinessEndpoint"
      contract="MDMStyleCreateBusinessService.IMDMBusinessService"
      name="basicHttpBusinessEndpoint" />
  </client>
  <services>
    <service name="RadComboLoadingServices"
             behaviorConfiguration="ASPNETAjaxServiceBehaviorConfiguration">
      <endpoint address=""
                behaviorConfiguration="ASPNETAjaxEndpointBehaviorConfiguration"
                binding="webHttpBinding"
                bindingConfiguration="webHttpBindingConfiguration"
                contract="DKS.MDM.StyleCreate.Presentation.RadComboLoadOnDemandService" />
      <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
    </service>
  </services>
  <behaviors>
    <serviceBehaviors>
      <behavior name="ASPNETAjaxServiceBehaviorConfiguration">
        <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
        <serviceMetadata httpGetEnabled="true" />
      </behavior>
    </serviceBehaviors>
    <endpointBehaviors>
      <behavior name="ASPNETAjaxEndpointBehaviorConfiguration">
        <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
        <enableWebScript />
      </behavior>
    </endpointBehaviors>
  </behaviors>
  <serviceHostingEnvironment aspNetCompatibilityEnabled="true"  multipleSiteBindingsEnabled="true" />
</system.serviceModel>

anybody see anything wrong with the configuration?

In my svc file, I have the following:

[ServiceContract(Namespace = "DKS.MDM.StyleCreate.Presentation")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]

and on the contract method, I have:

[OperationContract]
public RadComboBoxData LoadComboItems(RadComboBoxContext context)
{
     ...
}


Thanks,

Charlie

1 Answer, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 12 Nov 2012, 11:10 AM
Hi Charles,

The experienced behavior is caused by a XSS restrictions. Here you could find a forum post on the matter.

All the best,
Dimitar Terziev
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.
Tags
ComboBox
Asked by
Charles
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question
or