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 9121313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:50:01+00:00 2026-06-17T05:50:01+00:00

In my web application I have a route which looks like this: routeCollection.MapRoute( AdfsMetadata,

  • 0

In my web application I have a route which looks like this:

routeCollection.MapRoute(
    "AdfsMetadata",                                                // name
    "FederationMetadata/2007-06/FederationMetadata.xml",           // url
    new { controller = "AdfsController", action = "MetaData" });   // defaults

The idea behind this route was to work better with Microsoft AD FS server (2.0+) which looks for AD FS metadata at this point when you just specify a host name. With MVC3 all worked fine. But we upgraded the project to MVC4 recently and now the call for this URL results in a 404, the handler mentioned on the error page is StaticFile and the physical path is D:\path\to\my\project\FederationMetadata\2007-06\FederationMetadata.xml. I assume that MVC or ASP.NET “thinks” it must be a request for a static file and looks for the file, but it isn’t a file. The data is generated dynamically – that’s why I routed the URL to a controller action. The problem is that even the Route Debugger by Phil Haack doesn’t work. It’s just a 404 with no further information besides that IIS tried to access a physical file which isn’t there.

Does anyone have a solution for this? I just want this URL to be routed to a controller action.

P.S.: I’m not 100% sure that the cause was the upgrade to MVC4, it was just a guess because the error occurred at about the same time as the upgrade, and the same route works in another project which is still using MVC3.

Edit:

I have a custom ControllerFactory which needs the full class name (AdfsController instead of Adfs), so the suffix Controller is correct in this case.

  • 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-17T05:50:02+00:00Added an answer on June 17, 2026 at 5:50 am

    Add the following to the <handlers> section of the <system.webServer> node:

    <add 
        name="AdfsMetadata" 
        path="/FederationMetadata/2007-06/FederationMetadata.xml" 
        verb="GET" 
        type="System.Web.Handlers.TransferRequestHandler" 
        preCondition="integratedMode,runtimeVersionv4.0" />
    

    This instructs IIS that GET requests to the specified url should be handled by the managed pipeline and not considered as static files and served by IIS directly.

    I have a custom ControllerFactory which needs the full class name
    (AdfsController instead of Adfs), so the suffix Controller is correct
    in this case.

    Double check this please. Try with and without the Controller suffix in the route definition.

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

Sidebar

Related Questions

In my web application users have the ability to upload games which are then
For our Kunagi Java web application we have a signed kunagi.jar file which contains
I have a web application which will return a user id based on the
I have a growing web application which now needs to be able to store
I have a web application which was using Asp.net MVC2 . I Upgraded it
We have an ASP.Net Web Application that is running in an IIS Web-Garden--which is
I have an ASP.Net application which has an area called 'Customers'. This area has
We have a huge ASP.NET web application which needs to be deployed to LIVE
I have a Symfony2 Web application which requires user login to perform such useful
Good Afternoon, I have a web application (MVC3) which has master page. I have

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.