2012-12-29 56 views
2

我正在使用URL重寫規則重寫URL來訪問Sharepoint服務器。除了我在/_vti_bin/listdata.svc上獲得404以外,一切正常。我也在應用程序日誌中的代理服務器上發生錯誤。通過URL訪問listdata.svc重寫重定向到SharePoint 2010

登錄名稱:應用程序

來源:System.ServiceModel 4.0.0.0

日期:2013年1月3日下午12時49分二十秒

事件ID:3

任務類別:WebHost

級別:錯誤

關鍵詞:經典

用戶:IIS APPPOOL \ HrSelfService

計算機:webnet01test.bluebunny.com

說明:

虛擬主機提供商無法處理請求。發件人信息:System.ServiceModel.Activation.HostedHttpRequestAsyncResult/9460241異常:System.Web.HttpException(0x80004005):服務'/_vti_bin/listdata.svc'不存在。 --->System.ServiceModel.EndpointNotFoundException:服務'/_vti_bin/listdata.svc'不存在。 在System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(字符串normalizedVirtualPath) 在System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(字符串relativeVirtualPath) 在System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest() 在System.ServiceModel.Activation。 HostedHttpRequestAsyncResult.BeginRequest() 在System.Runtime.AsyncResult.End [TAsyncResult](IAsyncResult的結果) 在System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult的結果)

我從SharePoint填充菜單標題列表...

因此,頁面將是domain2.com/pages/default.aspx和下面的代碼將執行並填充頁面上的菜單。

感謝您提供任何幫助。


$阿賈克斯({ 網址: 「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> 

回答

3

我在這個問題上與微軟合作,並想出如果您通過URL Rewrite proxy請求來自SharePoint的listdata.svc服務,請求將死於代理服務器。代理服務器會嘗試處理該請求,並顯然返回一個404.

我們不得不在IIS中刪除處理程序映射,以便服務請求將通過代理流向SharePoint服務器。

我們刪除了特定IIS網站上的svc-Integrated-4.0。

我們測試了SharePoint,一切正常,我們現在可以通過URL重寫訪問_vti_bin/listdata.svc。

+0

我只是想補充說我們有這個問題,並且與重定向關聯的「網站」被禁用。並非常感謝您成爲一名優秀的公民併爲此添加解決方案。你可能救了我幾天的努力。 –

+0

這個答案解決了我一直在努力的一個問題,試圖重寫一個內部開發的WCF服務。只要我在代理Web應用程序中刪除.SVC的處理程序映射,它一切正常。有趣的是需要注意的是刪除處理器映射會在web.config中添加一些元素,說明已經刪除了哪些處理器映射 – PeteL