Pete Finch
Pete Finch

Reputation: 53

Azure App Service "Server Error in '/' Application"

I have a business website that has been running perfectly well on IIS using .NET 4.5, but in Azure it fails.

Now before I lead you too far down this rabbit hole, I can make the IIS fault in the same way as the Azure fault detailed below by NOT converting the website to Application. However, for the life of me I cannot find the equivalent option in Azure; how to convert to Application or equivalent?

I have uploaded to Azure using the Azure App Service Migration Assistant. The only alert was:

"IIS7+ Schema Compliance: One or more elements and/or attributes are being used which are not defined in Azure App Service IIS schema. Consider using XDT transforms."

This links to https://learn.microsoft.com/en-nz/azure/app-service/web-sites-configure which indicates various Azure Application Settings, which I have played with to no avail.

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 

Can anyone please provide any guidance as to what I am missing? many thanks for your time, Peter Finch

Upvotes: 2

Views: 4472

Answers (1)

Pete Finch
Pete Finch

Reputation: 53

so the answer was setting virtual applications and directories for each website, and this now just worked. App Service, Application Settings, at the end of the list, Virtual applictions and directories. This was the part that was missing, how to 'convert to application' So resolved it myself, thanks for looking and I hope this helps someone else in the future.

/                            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

Upvotes: 2

Related Questions