Invalid Web.Config Caused Failure To Deploy ASP.NET App To Windows Azure: “All role instances have stopped”, “Busy”, “Aborted”, “Recovering role...”, “Preparing node…”
Improper configuration settings in web.config caused failure to deploy and start Windows Azure role and instance. This is what I observed via Windows Azure Management portal with changing statuses as depicted below:
In Visual Studio I observed the following statuses:
After trying to figure out for several hours what’s going on I opened service ticket and the result was this:
Exception:System.Runtime.InteropServices.COMException (0x800700B7): Filename: \\?\E:\approot\_WASR_\0\web.config
Line number: 42
Error: Config section 'system.web/authentication' already defined. Sections must only appear once per config file. See the help topic <location> for exceptions
After removing the duplicate entry in the web.config I flawlessly could deploy my app, which is available at https://wawithacsv2.cloudapp.net/. It showcases federated authentication for ASP.NET app deployed to Windows Azure. Try it. Do not get spooked by certificate warning – I am using self signed certificate. You can trust me :).
Related Materials
- Windows Azure: Changing Configuration In Web.Config Without Redeploying The Whole ASP.NET Application
- Widows Azure Content And Guidance Map For Developers – Part 1, Getting Started
- Widows Azure Content And Guidance Map For Developers – Part 2, Case Studies
- New Content Available For Windows Azure Developers - Windows Azure Code Quick Launch Samples and Walkthroughs