Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9317855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:58:49+00:00 2026-06-19T02:58:49+00:00

We are using the ADO.NET Data Service Provider Toolkit to implement a custom OData

  • 0

We are using the ADO.NET Data Service Provider Toolkit to implement a custom OData service endpoint running inside SharePoint 2010 (using .NET 3.5).

When the service is accessed in the root of a site collection the returned base address is correct, e.g.,

 http://localhost/_vti_bin/service.svc/ returns a base address (in the returned atom document) as <feed xml:base="http://localhost/_vti_bin/service.svc />

But when the service endpoint is accessed in a subsite, the additional path segments are ignored, e.g.

http://localhost/subsite/_vti_bin/service.svc/ returns a base address (in the returned atom document) as <feed xml:base="http://localhost/_vti_bin/service.svc />

Unfortunately, this incorrect behavior confuses PowerPivot (which seem to use the returned base address to access subsequent queries).

Is there a way to explicitly the xml:base attribute from within the provider code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T02:58:51+00:00Added an answer on June 19, 2026 at 2:58 am

    This can be corrected by using the same IDispatchMessageInspector trick (as used by Pablo Castro to support JSON formatting) and adding the following code:

            HttpRequestMessageProperty httpmsg = (HttpRequestMessageProperty)request.Properties[HttpRequestMessageProperty.Name];
            UriTemplateMatch match = (UriTemplateMatch)request.Properties["UriTemplateMatchResults"];
    
            match.RequestUri = new Uri(SPContext.Current.Web.Url + match.RequestUri.PathAndQuery, UriKind.Absolute);
            match.BaseUri = new Uri(SPContext.Current.Web.Url + match.BaseUri.AbsolutePath, UriKind.Absolute);
    

    which basically changes the Base and Request Uris to include the subsite path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application is a client/server solution using an ADO.NET Data Service. The Data Service
I am using ADO.Net Data Services and have a Service Operation that ends up
I have an ADO.NET Data Service and a regular WCF service. I'm using both
I am new on working with WCF service, I am using ADO.Net Entity Data
I have an OData WCF ADO.NET service created with Entity Framework using protocol version
I'm using ASP.NET MVC4 (EF Code-first) with WCF ADO.NET Data Service October 2011 CTP.
I'm building a data model using ADO.NET Entity Framework 3.5 in Visual Studio 2008
in our current project we are using ADO.NET Entity Framework as data layer for
I am using Oracle 11.1.0.6.0 and ADO.NET (System.Data.OracleClient) to run a query that works
Just some background, sorry so long winded. I'm using the System.Data.SQLite ADO.net adapter to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.