Azure Accelerator for Web Roles & serviceHostingEnvironment aspNetCompatibilityEnabled=“true”

StackOverflow https://stackoverflow.com/questions/7425342

  •  30-10-2019
  •  | 
  •  

Question

I'm not sure if this problem is specific to Accelerator for Web roles (WAAWR: http://waawebroles.codeplex.com/)

Edit: I have confirmed this error is only thrown in my WAAWR application - if I deploy the same code as a stand alone webrole this error is not thrown.

I'm trying to run WCF Routing / clean urls on an application that is being deployed via WAAWR. This feature requires asp .net compatibility mode. Here is my config section:

   <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true">
      <baseAddressPrefixFilters>
        <add prefix="http://api.mydomain.com"/>
      </baseAddressPrefixFilters>
    </serviceHostingEnvironment>
    <standardEndpoints>
      <webHttpEndpoint>
        <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true"/>
      </webHttpEndpoint>
    </standardEndpoints>
   </system.serviceModel>

I've been stuck on this error for a couple of hours:

System.IO.FileLoadException: Filename: \?\C:\Resources\directory\XXXXXXXXXXXXXXXXXXXXXXX\web.config Line number: 74 Error: This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false". at Microsoft.Web.Administration.Interop.IAppHostAdminManager.GetAdminSection(String bstrSectionName, String bstrPath) at Microsoft.Web.Administration.WebConfigurationManager.GetSectionInternal(String siteName, String virtualPath, String sectionPath, Type sectionType)

At first I thought that the apps you deploy via the web role host were sub-directories/virtual directories, so I threw this config into the .config file of the deploy host application itself - but that didn't do the trick. I remote desktop-ed in to see what's going on and it looks like each application deployed via the host is it's own application under IIS in its own right. Also when you explore the app from IIS manager, the apps aren't event located on the same drive as the deploy host. So I'm not sure why this error is being thrown.

Any ideas out there?

No correct solution

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