error 405 method not allowed

2 posts, 0 answers
  1. Charles
    Charles avatar
    21 posts
    Member since:
    Jan 2012

    Posted 09 Nov 2012 Link to this post

    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
  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 12 Nov 2012 Link to this post

    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.
Back to Top