+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / URL for WCF Javascript Proxy File is being rewritten

URL for WCF Javascript Proxy File is being rewritten

7 posts, 0 answered
  1. Bob Pinna
    Bob Pinna avatar
    13 posts
    Registered:
    10 Apr 2005
    15 Mar 2009
    Link to this post
    Trying to add an Ajax-Enabled WCF Service to a sitefinity application.

    The service fails and when I access the Javascript proxy file directly, it gets redirected and returns a 404.  That is:

    ..../MyService.svc/jsdebug

    gets redirected to

    .../MyService.svc/jsdebug.aspx

    and of course, returns a 404.

    I can't figure out where the redirect is coming from.  Can you shed some light on Ajax-Enabled WCF services in sitefinity?
  2. Bob Pinna
    Bob Pinna avatar
    13 posts
    Registered:
    10 Apr 2005
    15 Mar 2009
    Link to this post
    And same service works in a non-sitefinity solution.
  3. Bob Pinna
    Bob Pinna avatar
    13 posts
    Registered:
    10 Apr 2005
    15 Mar 2009
    Link to this post
    Also, ASP.NET Development Server and VS2008 SP1 and .NET 3.5 SP1
  4. EuclidLibrary
    EuclidLibrary avatar
    18 posts
    Registered:
    28 Aug 2008
    17 Mar 2009
    Link to this post
    After spending the time to upgrade my site to 3.6 (re-customize templates and resolve issues caused by ninja changes to the API) I discovered the same thing with wcf services.  It appears that the default page handler is redirecting to an aspx page of the same name if the incoming url is extentionless.  Is there a work around for this or away to disaable this "feature"?
  5. Dido
    Dido avatar
    149 posts
    Registered:
    24 Sep 2012
    18 Mar 2009
    Link to this post
    Hi EuclidLibrary,

    This issue is being worked on. We will try our best to fix it for the service pack.

    Sincerely yours,
    Dido
    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.
  6. Bob Pinna
    Bob Pinna avatar
    13 posts
    Registered:
    10 Apr 2005
    25 Mar 2009
    Link to this post
    Any word on if this will make it into the next service pack and when that might be.

    Currently blocked on this.  Workaround?
  7. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    30 Mar 2009
    Link to this post
    Hello Bob,

    The Sitefinity service pack is currently scheduled for the first half of April.

    In the meantime, you can use the following workaround:
     1. Create CmsHttpModuleFix class in the App_Code:
    using System; 
    using System.Collections.Generic; 
    using System.Web; 
    using Telerik.Cms.Web; 
     
    // Remove this class after upgrading to Sitefinity 3.6 SP1 
    public class CmsHttpModuleFix : CmsHttpModule 
        protected override void RewriteURL(string newURL, bool rebaseClientPath) 
        { 
            CmsHttpRequest cmsRequest = CmsHttpRequest.Current; 
            if (cmsRequest.IsPathChanged 
                && cmsRequest.ExtensionLower.Equals(UrlHelper.PageExtension) 
                && (cmsRequest.PathSegments.Length > 1) 
                && cmsRequest.PathSegments[cmsRequest.PathSegments.Length - 1].Contains(".svc"
                ) 
            { 
                return
            } 
            base.RewriteURL(newURL, rebaseClientPath); 
        } 

     2. Replace the default CmsHttpModule declaration in the web.config:
    <add name="Cms" type="CmsHttpModuleFix, App_Code"/> 

    In case your site is running on Classic pipeline mode, you should replace the module in the /system.web/httpModules . If the pipeline mode is Integrated, replace it in the /system.webServer/modules section.


    Greetings,
    Vlad
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Register for webinar
7 posts, 0 answered