发布Silverlight,报错 <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
在发布silverlight时,报如下错误:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.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:
|
注意 allowDefinition='MachineToApplication' beyond application level,说明你在IIS上发布的应用程序不符合要求。
重新再IIS中添加虚拟目录,勾选上“执行(如ISAP应用程序或CGI)(E)”选项即可,然后会在IIS默认网站下显示一个齿轮状的文件夹标示,将编译好的silverlight程序拷贝到该文件夹下就不会出现这个错误了。