Azure应用服务“'''应用程序中的服务器错误”

时间:2018-06-13 00:30:17

标签: web-services azure iis

我有一个使用.NET 4.5在IIS上运行良好的商业网站,但在Azure中它失败了。

现在,在我带领您走过这个兔子洞之前,我可以通过不将网站转换为应用程序来解决IIS故障的方式与下面详述的Azure故障相同。但是,对于我的生活,我在Azure中找不到相同的选项;如何转换为Application或等效的?

我已使用Azure App Service Migration Assistant上传到Azure。唯一的警告是:

  

“IIS7 +架构合规性:正在使用一个或多个未在Azure App Service IIS架构中定义的元素和/或属性。请考虑使用XDT转换。”

此链接指向https://docs.microsoft.com/en-nz/azure/app-service/web-sites-configure,表示我玩过的各种Azure应用程序设置无效。

Server Error in '/' Application.

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: 

An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.


 Source File:  D:\home\site\wwwroot\peterfinch\service.desktop\web.config    Line:  143 

任何人都可以就我缺少的内容提供任何指导吗?非常感谢你的时间,Peter Finch

1 个答案:

答案 0 :(得分:1)

所以答案是为每个网站设置虚拟应用程序和目录,现在这已经奏效了。应用程序服务,应用程序设置,列表末尾,虚拟应用程序和目录。 这是缺少的部分,如何'转换为应用程序' 所以我自己解决了,谢谢你的期待,我希望将来可以帮助别人。

/                            site\wwwroot                            Application x
/mysitename                  site\wwwroot\mysitename                 Application 
/mysitename/Console          site\wwwroot\mysitename\Console\        Application x
/mysitename/Service.App      site\wwwroot\mysitename\Service.App\    Application x
/mysitename/Service.Desktop  site\wwwroot\mysitename\Service.Desktop Application x