Question

Following up on a question I posted earlier, and with the assumption that ASP.NET MVC5 generates the FederationMetadata.xml file dynamically (probably through code like this), I'd like to know whether I can get a reference to the instance of ApplicationServiceDescriptor so I could alter the FederationMetadata.xml being generated. If that's not possible, is there a way to stop this mechanism altogether and replace it with custom code? Like a different FederationMetadata.xml file provider or something?

Was it helpful?

Solution

I don't know MVC5. In MVC4 we just generate the metadata document ourselves using a controller that is linked to a

routes.MapRoute(
                name: "FederationMetaData",
                url: "FederationMetadata/2007-06/FederationMetadata.xml",
                defaults: new
                          {
                              controller = "FederationMetadata",
                              action = "GenerateMetaData"
                          }
                );

IMHO you probably just need to install your controller to handle the route.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top