I have a Silverlight application that communicates to a WCF service. As part of the web.config file there is a required section to use WCF:
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
</system.serviceModel>
Upon deployment to a Windows 2008 server I get the following error when launching my Silverlight app:
Parser Error Message: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This error can be
caused by a virtual directory not being configured as an application in IIS.
Source Error:
Line 29:
Line 30: <system.serviceModel>
Line 31: <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
Line 32: multipleSiteBindingsEnabled="true" />
Line 33: </system.serviceModel>
After some research there are a couple of items that could cause this:
- The directory where the app resides is not setup as an application in IIS
- Multiple web.config files exist in one or more sub-directories underneath the application structure.
Neither of these situations apply in my case. My app is setup as an application under IIS and there is only one web.config file in the application structure.
Any other reasons this message would occur? It also happens if I explicitly define the authentication type in the web.config file for the app.
Thanks for your help.