I have an azure solution configured with one MVC4 web role, and two back-end web roles. I’ve been testing this on IISExpress, using internal http endpoints. This works well. I now want to test tcp endpoints, as those are what we will probably be using on Azure live, so I’ve changed the deployment option to use full IIS, since as I understand it, IISExpress does not support tcp bindings. I haven’t yet made any changes to the endpoints, or altered anything else about the deployment. This results in a failure of the roleenvironment to initialize, and the ‘role discover data is unavailable error’. I have this in the output window:
\Microsoft.Data.Services.Client\v4.0_4.99.2.0__31bf3856ad364e3
\Microsoft.Data.Services.Client.dll', Skipped loading symbols. Module is optimized and the
debugger option 'Just My Code' is enabled.
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_32\msshrtmi
\1.7.0.0__31bf3856ad364e35\msshrtmi.dll'
Microsoft.WindowsAzure.ServiceRuntime Information: 100 : Role environment . INITIALIZING
Microsoft.WindowsAzure.ServiceRuntime Information: 100 : Role environment . INITIALED RETURNED.
HResult=-2147467259
Microsoft.WindowsAzure.ServiceRuntime Error: 102 : Role environment . FAILED TO INITIALIZE
A first chance exception of type 'System.InvalidOperationException' occurred in
Microsoft.WindowsAzure.ServiceRuntime.dll
All my instances are visible, both as sites under IIS and in the compute emulator. I don’t see anything unusual in the emulator diagnostics, which look like this for the MVC4 web role, and similar for the WCF services:
[fabric] Role Instance: deployment17(123).Azure.Web.Test.0
[fabric] Role state Unhealthy
[Diagnostics]: UpdateState(Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorStartupInfo,
Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorConfiguration, )
[Diagnostics]: Acquired mutex
[Diagnostics] Information: C:\Users\User\AppData\Local\dftmp\Resources\5911e3b3-15ce-4b36-ab50-
f04dda461e60\directory\DiagnosticStore\Monitor
[Diagnostics] Information: D:\Work\CLIENTS\Test\Solutions\Test\Azure\csx\Debug\roles\Web.Test
\diagnostics\x64\monitor\MonAgentHost.exe -LocalPath "C:\Users\User\AppData\Local\dftmp\Resources
\5911e3b3-15ce-4b36-ab50-f04dda461e60\directory\DiagnosticStore\Monitor" -StaticConfigFile
"C:\Users\User\AppData\Local\dftmp\Resources\5911e3b3-15ce-4b36-ab50-f04dda461e60\directory
\DiagnosticStore\Monitor\Configuration\mastaticconfig.xml" -ConfigFile "C:\Users\User\AppData
\Local\dftmp\Resources\5911e3b3-15ce-4b36-ab50-f04dda461e60\directory\DiagnosticStore\Monitor
\Configuration\maconfig.xml" -ShutDownEvent WADDM-ShutDown-38fb5936e7b14b058ae4a7c0b516945d
-InitializedEvent WADM-StartUp-38fb5936e7b14b058ae4a7c0b516945d -parent 15308 -events
[Diagnostics]: Creating config channel server
[MonAgentHost] Output: Agent will exit when WADDM-ShutDown-38fb5936e7b14b058ae4a7c0b516945d is
signaled.
[MonAgentHost] Output: Will signal WADM-StartUp-38fb5936e7b14b058ae4a7c0b516945d after the agent
is initialized.
[MonAgentHost] Output: Registered as an event consumer.
[MonAgentHost] Output: Agent will exit when parent process 15308 exits.
[MonAgentHost] Output: Monitoring Agent Started
[Diagnostics]: Starting configuration channel polling
[fabric] Role state Started
[runtime] Role entrypoint . CALLING OnStart()
[runtime] Role entrypoint . COMPLETED OnStart()
[runtime] Role entrypoint . CALLING Run()
Any idea what’s causing this? Are there further configuration steps to get full IIS working?
Some more details about my environment:
Win 7 x64 | IIS 7.5 | Latest release of Azure SDK
To understand your problem, I created a MVC4 Web Role with HTTP/80 and Internal-HTTP (port-auto) endpoint and two Worker Role with internal TCP endpoints. I setup the following in each worker role:
And the following in MVC4 HomeController:
I could run this scenario both with IISExpress and IIS7.5 without any problem.
If you just create a helloworld VS2010 solution (including your full configuration) which exhibit the problem, and share here, I sure can take a look and find a fix for you.