【问题标题】:Accessing listdata.svc via URL Rewrite redirect to SharePoint 2010通过 URL 重写重定向到 SharePoint 2010 访问 listdata.svc
【发布时间】:2012-12-14 06:50:38
【问题描述】:

我使用 URL 重写规则访问代理服务器,重写 URL 以访问 Sharepoint 服务器。一切正常,除了我在 /_vti_bin/listdata.svc 上得到 404。我还在应用日志中的代理服务器上收到错误消息。

日志名称:应用程序

来源:System.ServiceModel 4.0.0.0

日期:2013 年 1 月 3 日下午 12:49:20

事件 ID:3

任务类别:WebHost

级别:错误

关键词:经典

用户:IIS APPPOOL\HrSelfService

计算机:webnet01test.bluebunny.com

说明:

WebHost 未能处理请求。发件人信息: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 结果)

我正在从共享点列表填充菜单标题...

因此页面将是 domain2.com/pages/default.aspx,下面的代码将执行并填充页面上的菜单。

感谢您提供的任何帮助。


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

 数据类型:'json',
        跨域:真,
        异步:假,
        成功:函数(数据){
        var menuLength = data.d.results.length;
        对于 (i=0; i

【问题讨论】:

    标签: jquery json sharepoint-2010 url-rewriting svc


    【解决方案1】:

    我在这个问题上与 Microsoft 合作,发现如果您通过 URL 重写代理从 SharePoint 请求 listdata.svc 服务,该请求将在代理处终止。发生的情况是代理服务器尝试处理请求并显然返回 404。

    我们必须做的是删除 IIS 中的处理程序映射,以便服务请求通过代理流向 SharePoint 服务器。

    我们删除了特定 IIS 网站上的 svc-Integrated-4.0。

    我们测试了 SharePoint,一切正常,现在我们可以通过 URL 重写访问 _vti_bin/listdata.svc。

    【讨论】:

    • 我只是想补充一点,我们遇到了这个问题,并且与重定向关联的“站点”已被禁用。非常感谢您成为一个好公民并为此添加您的解决方案。您可能为我节省了几天的精力。
    • 这个答案解决了我多年来一直在努力解决的问题,试图重写为内部开发的 WCF 服务。在我的代理 Web 应用程序中删除 .SVC 的处理程序映射后,一切正常。值得注意的是,删除处理程序映射会在 web.config 中添加一些元素,说明哪些处理程序映射已被删除
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-02-22
    • 2011-08-25
    • 2021-05-21
    • 2013-08-30
    • 1970-01-01
    • 1970-01-01
    • 2022-07-07
    相关资源
    最近更新 更多