Multiple Classes with RoleEntryPoint As The Base Class

When starting the Development Fabric for Windows Azure in Visual Studio 2010 are you getting this error:

 

Windows Azure Tools: Start role failed for one or more roles

Windows Azure Tools: Role instances did not start within the time allowed. Please try again. If you continue to encounter this behavior please try shutting down the Development Fabric.

 

In your output window? Or, maybe you are seeing these errors in your Windows Event Viewer under the application log:

 

The worker process for application pool '{B97C113B-B318-4AFC-84DA-XXXXXXXXX}' encountered an error 'The configuration section 'system.webServer/globalModules' cannot be read because it is missing a section declaration

' trying to read global module configuration data from file '\\?\D:\T\s0\deployment(2)\res\deployment(2).XXXXXX. WebRole.0\temp\temp\applicationHost.config', line number '0'. Worker process startup aborted.

Or:

 

Failed to initialize the AppDomain:/LM/W3SVC/1/ROOT

Exception: System.Configuration.ConfigurationErrorsException

Message: Exception of type 'System.Configuration.ConfigurationErrorsException' was thrown.

StackTrace: at System.Web.Configuration.ErrorRuntimeConfig.ErrorConfigRecord.System.Configuration.Internal.IInternalConfigRecord.GetLkgSection(String configKey)

at System.Web.Configuration.RuntimeConfigLKG.GetSectionObject(String sectionName)

at System.Web.Configuration.RuntimeConfig.GetSection(String sectionName, Type type, ResultsIndex index)

at System.Web.Configuration.RuntimeConfig.get_HostingEnvironment()

at System.Web.Hosting.HostingEnvironment.StartMonitoringForIdleTimeout()

at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel)

at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel)

at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

I did, and it was because I had multiple classes in my worker role subclassed from RoleEntryPoint. You can only have one class per Worker or Web Role subclassed from RoleEntryPoint. Special thanks to Microsoft Customer Technology Support.  Hope this helps someone.

 

{6230289B-5BEE-409e-932A-2F01FA407A92}

Comments

Post a Comment

Popular posts from this blog

Simple WP7 Mango App for Background Tasks, Toast, and Tiles: Code Explanation

Yet once more into the breech (of altered programming logic)

How to convert SVG data to a Png Image file Using InkScape