3

I use the following code inside my application Application_Start section. This updates the web.config with the latest token and is used in all the tutorials for Azure AD consuming apps.

My app, which has been running happily, has now failed to start with an Access Denied error to the web.config path linked to this code. The code itself hasn't changed so I assume some security update has come in. I can't find any reference to the error or update online. The security settings on the folder look just fine. A redeploy doesn't resolve this.

protected void RefreshValidationSettings()
{
     string configPath = AppDomain.CurrentDomain.BaseDirectory + "\\" + "Web.config";
     string metadataAddress = 
         ConfigurationManager.AppSettings["ida:FederationMetadataLocation"];
     ValidatingIssuerNameRegistry.WriteToConfig(metadataAddress, configPath);
}
Philippe Signoret
  • 13,299
  • 1
  • 40
  • 58
Steve Newton
  • 1,046
  • 1
  • 11
  • 28
  • Have updated the packages just in case there is an issue, works locally but not in Azure. – Steve Newton Nov 21 '14 at 14:42
  • I raised this with MS but had no prompt reply. I have reworked the application to use the new Owin implementation which doesn't require the same technique. – Steve Newton Feb 15 '15 at 18:52

1 Answers1

1

please check this VS2013 RTM, Organizational Accounts and Publishing to Windows Azure Web Sites

Anatoly Ruchka
  • 543
  • 4
  • 17
  • Having read it, it just proves that what I have is correct? The link to a previous post shows exactly what I have implemented. I haven't used the new templates as mine was created in 2012 but this just moves it to a database and not in the web.config. – Steve Newton Dec 15 '14 at 20:03