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 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 developed a VB.NET WCF service that recives and sends back data. When
I have client application that uses WCF service to insert some data to backend
I have a WCF Web Service which is referenced from a class library. After
I'm implementing several custom Data Service Providers in WCF Data Services : IDataServiceMetadataProvider IDataServiceQueryProvider
I have a WCF service which I would like to product XML and JSON
I'm preparing to create a WCF Service which our customers can use to update
How to access App_Data folder in WCF service? I have placed a xslt file
I have a WCF service that I have to reference from a .net 2.0
I have a wcf application hosted in a windows service running a local windows
I have a WCF service hosted for internal clients - we have control of

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.