2

I am hitting a proxy server with URL rewrite rules rewriting the URL's to access a Sharepoint server. Everything works except I get a 404 on /_vti_bin/listdata.svc. I also get an error on the proxy server in the app log.

Log Name: Application

Source: System.ServiceModel 4.0.0.0

Date: 1/3/2013 12:49:20 PM

Event ID: 3

Task Category: WebHost

Level: Error

Keywords: Classic

User: IIS APPPOOL\HrSelfService

Computer: webnet01test.bluebunny.com

Description:

WebHost failed to process a request. Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/9460241 Exception: System.Web.HttpException (0x80004005): The service '/_vti_bin/listdata.svc' does not exist. ---> System.ServiceModel.EndpointNotFoundException: The service '/_vti_bin/listdata.svc' does not exist. at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest() at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)

I am populating menu headers from a sharepoint list...

So the page would be domain2.com/pages/default.aspx and the below code would execute and populate a menu on the page.

Thanks for any help you can give.


$.ajax({ url: "http://Domain1.com/_vti_bin/listdata.svc/MegaMenuCategories?$orderby=OrderingValue%20asc",

        dataType: 'json',
        crossDomain:true, 
        async: false,
        success: function (data) {
        var menuLength = data.d.results.length;
        for (i=0; i<data.d.results.length; i++){
            var results1 = data.d.results[i].MenuTitle;
            var order = data.d.results[i].OrderingValue;

            if (order == "1")
                addMenuTitle(order, results1);   

            if (order == "2")
                addMenuTitle(order, results1);

            if (order == "3")
                addMenuTitle(order, results1);

            if (order == "4")
                addMenuTitle(order, results1);

            if (order == "5")
                addMenuTitle(order, results1);

            if (order == "6")
                addMenuTitle(order, results1);
        }
        if (menuLength == "5"){
            $("#megaRtCorner").css("left","490px");
            $("#megaMenu").css("width","475px");
        }
       }
    });</code>
calorie712
  • 348
  • 4
  • 14

1 Answers1

3

I worked with Microsoft on this issue and figured out if you request the listdata.svc service from SharePoint through a URL Rewrite proxy the request will die at the proxy. What happens is the proxy server tries to handle the request and obviously returns a 404.

What we had to do was remove the handler mapping in IIS so the service request would flow through the proxy to the SharePoint server.

We removed the svc-Integrated-4.0 on the specific IIS website.

We tested SharePoint and everything is working great and we now have access to _vti_bin/listdata.svc through URL Rewrite.

calorie712
  • 348
  • 4
  • 14
  • I just wanted to add that we had this issue and the "site" associated with the redirect was disabled. And thank you so much for being a good citizen and adding your solution to this. You probably saved me days of effort. – Robert Kaucher Jun 15 '13 at 00:35
  • This answer solved a problem I'd been working on for days, trying to rewrite to an in-house developed WCF service. As soon as I removed the handler mappings for .SVC in my proxy web application, it all worked fine. What was interesting to note was that removing the handler mappings adds some elements to web.config, stating what handler mappings have been removed – PeteL Mar 30 '17 at 22:58