Is it possible to get ACS claims without editing web.config?
To remove that xml line from the web config, I made my own WSFederationAuthenticationModule overriding the old one, like so:
public class CustomWSFederationAuthenticationModule : WSFederationAuthenticationModule
{
protected override void InitializePropertiesFromConfiguration(string serviceName)
{
this.Realm = "http://localhost:81/";
this.Issuer = "https://acsnamespace.accesscontrol.windows.net/v2/wsfederation";
this.RequireHttps = false;
this.PassiveRedirectEnabled = true;
}
}
And the important part of the web.config:
<modules runAllManagedModulesForAllRequests="true">
<add name="WSFederationAuthenticationModule" type="CustomModuleLocation.CustomWSFederationAuthenticationModule, CustomModuleLocation" preCondition="managedHandler"/>
<add name="SessionAuthenticationModule" type="Microsoft.IdentityModel.Web.SessionAuthenticationModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler" />
</modules>
Also the federatedAuthentication section of the XML is removed entirely.