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

  • SEARCH
  • Home
  • 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 3241842
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:14:43+00:00 2026-05-17T18:14:43+00:00

I have a WCF Data Service for which I have a custom URL Rewriter

  • 0

I have a WCF Data Service for which I have a custom URL Rewriter so the real url is not visible and I can add special elements in the path for customizing it.
For example:
http://localhost/Data/ABCD.odata/
Maps to:
http://localhost/Data/OneData.svc/

This almost works except that the service is publishing back in the response XML the real path where it is located thus apps like PowerPivot for Excel is looking at that URL and doing the second hit on that URL not on the one I want.

So the question is how can I force the service to publish in the xml:base a custom url.

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<service xml:base="http://localhost/Data/OneData.svc/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app">
  <workspace>
    <atom:title>Default</atom:title>
    <collection href="Products">
      <atom:title>Products</atom:title>
    </collection>
  </workspace>
</service>

I want that to publish:

<service xml:base="http://localhost/Data/ABCD.odata/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" 
  • 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-05-17T18:14:44+00:00Added an answer on May 17, 2026 at 6:14 pm

    A simple solution is to use ASP.NET routing.
    See:

    1. http://blogs.msdn.com/b/rjacobs/archive/2010/04/05/using-system-web-routing-with-data-services-odata.aspx
    2. http://blogs.msdn.com/b/rjacobs/archive/2010/04/06/wcf-data-services-and-serviceroute.aspx
    3. http://blogs.msdn.com/b/rjacobs/archive/2010/04/08/wcf-data-services-odata-and-eliminating-the-svc-file.aspx
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF service which performs CRUD operation on my data model: Add,
I have a WCF service that can return large amount of data depending on
I have two WCF service applications which pass Data Transfer Objects between each other
I have a WCF data service, which works fine. But now I want it
I have a WCF service which sits in front of a data collection. I
I have a WCF web service which throws exceptions when invalid data is submitted.
I have a simple WCF Data Services service and I want to expose a
I have a problem with my WCF Data Service, and this one is just
I have a Data Service created using WCF that internally uses nHibernate. This WCF
I have a WCF web-service and a Silverlight app displaying data from that service.

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.