Redirector still works
but the .NET 4 shared host will not run
I granted NETWORK SERVICE full access to
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config
then in order to kickstart it, instead of re-installing Ultidev again I moved it to a new host with the same parameters:
.NET 4
64-bit on 64-bit system
Network Service account
Note that I called the new host "ok". I noticed that caused this event to be logged:
Code:
Metabase change handling failed due to:
System.InvalidOperationException: Process was not started by this object, so requested information cannot be determined.
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_ExitCode()
at UltiDev.WebServer.Monitor.AppPoolControllerClient.GetHostProcessStatusUIText()
at UltiDev.WebServer.Monitor.MonitorService.ReloadAppConfigData2()
Following changes were partially done:
-------------------- 3/19/2012 9:33:58 PM --------------------
New host "ID={4fd8b3f7-bc73-4583-95fe-e7b69b10a3ae}, Name="UltiDev Web Server App Redirector", CLR & Bitness=Clr2AnyCPU, Original security context user=NetworkService, Number of applications=1" has an existing counter-part "ID={4fd8b3f7-bc73-4583-95fe-e7b69b10a3ae}, Name="UltiDev Web Server App Redirector", CLR & Bitness=Clr2AnyCPU, Original security context user=NetworkService, Number of applications=1" (Running, process ID=8580) that will be kept.
-------------------- 3/19/2012 9:33:59 PM --------------------
New host "ID={cbb8cf9d-bf37-4db7-873a-c8ebf1da7d8b}, Name="ok", CLR & Bitness=Clr4AnyCPU, Original security context user=NetworkService, Number of applications=1" and it's a completely new host.
-------------------- 3/19/2012 9:33:59 PM --------------------
After that, same Access Denied events as in original post were logged.
Alright, finally, regarding switching to a new host under Local System, several events were logged and then something crashed:
#1
Code:
Log Name: Application
Source: UltiDev Web Server Monitoring Service
Date: 3/19/2012 9:50:27 PM
Event ID: 0
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Description:
Metabase change handling failed due to:
System.InvalidOperationException: Process was not started by this object, so requested information cannot be determined.
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_ExitCode()
at UltiDev.WebServer.Monitor.AppPoolControllerClient.GetHostProcessStatusUIText()
at UltiDev.WebServer.Monitor.MonitorService.ReloadAppConfigData2()
Following changes were partially done:
-------------------- 3/19/2012 9:50:27 PM --------------------
New host "ID={4fd8b3f7-bc73-4583-95fe-e7b69b10a3ae}, Name="UltiDev Web Server App Redirector", CLR & Bitness=Clr2AnyCPU, Original security context user=NetworkService, Number of applications=1" and it's a completely new host.
-------------------- 3/19/2012 9:50:27 PM --------------------
New host "ID={cbb8cf9d-bf37-4db7-873a-c8ebf1da7d8b}, Name="ok", CLR & Bitness=Clr4AnyCPU, Original security context user=NetworkService, Number of applications=0" and it's a completely new host. We won't run it, however, because it doesn't host any apps.
-------------------- 3/19/2012 9:50:27 PM --------------------
New host "ID={53de5b13-eb66-449f-97a3-7a0f9080e649}, Name="OK2", CLR & Bitness=Clr4AnyCPU, Original security context user=LocalSystem, Number of applications=1" and it's a completely new host.
-------------------- 3/19/2012 9:50:27 PM --------------------
#2
Code:
Log Name: Application
Source: UWS Host UWS.AppHost.Clr4.AnyCPU
Date: 3/19/2012 9:50:27 PM
Event ID: 0
Task Category: None
Level: Information
Keywords: Classic
User: N/A
Description:
Host 53de5b13-eb66-449f-97a3-7a0f9080e649: Successfully registered IPC server channels "UWS.HostController.{53DE5B13-EB66-449F-97A3-7A0F9080E649}.12872" and "UWS.HostController.{53DE5B13-EB66-449F-97A3-7A0F9080E649}" to allow monitoring server control.
#3
Code:
Log Name: Application
Source: UWS Host UWS.AppHost.Clr4.AnyCPU
Date: 3/19/2012 9:50:29 PM
Event ID: 0
Task Category: None
Level: Information
Keywords: Classic
User: N/A
Description:
Host 9000b55f-4cab-4292-8c90-81d3d162bb18: Successfully registered IPC server channels "UWS.HostController.{9000B55F-4CAB-4292-8C90-81D3D162BB18}.14688" and "UWS.HostController.{9000B55F-4CAB-4292-8C90-81D3D162BB18}" to allow monitoring server control.
#4
Code:
Log Name: Application
Source: UWS Host UWS.AppHost.Clr4.AnyCPU
Date: 3/19/2012 9:50:29 PM
Event ID: 0
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Description:
UltiDev Web Server host process ""C:\Program Files\UltiDev\Web Server\UWS.AppHost.Clr4.AnyCPU.exe" 9000b55f-4cab-4292-8c90-81d3d162bb18" has failed due to
"System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Access to the path 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config' is denied. (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config) ---> System.UnauthorizedAccessException: Access to the path 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName, Boolean assertPermissions)
at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
--- End of inner exception stack trace ---
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
--- End of inner exception stack trace ---
at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
at System.Diagnostics.DiagnosticsConfiguration.Initialize()
at System.Diagnostics.TraceInternal.InitializeSettings()
at System.Diagnostics.TraceInternal.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)
at UWS.AppPool.Program.SpitOut(EventLogEntryType entryType, String format, Object[] args)
at UWS.AppPool.Program.RegisterChannels(Guid appHostID)
at UWS.AppPool.Program.HostAppPool(Guid appHostID)
at UWS.AppPool.Program.DoIt(String[] args)
at UWS.AppPool.Program.Main(String[] args)".
#5
Code:
Host 53de5b13-eb66-449f-97a3-7a0f9080e649: Successfully registered type AppPoolHost for remote control by monitoring service. Waiting for incoming commands.
Service Channels:
===============================================================
UWS.HostController.{53DE5B13-EB66-449F-97A3-7A0F9080E649}.12872
UWS.HostController.{53DE5B13-EB66-449F-97A3-7A0F9080E649}
Services:
===============================================================
UWS.MonitoringCommons.AppPoolHost at AppHost
And then UltiDev.WebServer.Monitor.exe crashed. I opened VS 2010 debugger for more detail:
Code:
System.Runtime.Remoting.RemotingException was unhandled
Message=The channel 'UWS.HostController.{4FD8B3F7-BC73-4583-95FE-E7B69B10A3AE}.8580' is already registered.
Source=mscorlib
StackTrace:
at System.Runtime.Remoting.Channels.ChannelServices.RegisterChannelInternal(IChannel chnl, Boolean ensureSecurity)
at System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(IChannel chnl, Boolean ensureSecurity)
at UWS.MonitoringCommons.MonitoringRemote.RegisterMainHostClientChannel(Guid hostID, Int32 hostProcessID)
at UltiDev.WebServer.Monitor.AppPoolControllerClient.InstantiateHostControllerClient(Boolean keepTryingForAwhile, Boolean doItEvenIfNotMonitoring)
at UltiDev.WebServer.Monitor.AppPoolControllerClient.CheckHostHeartbeat(Boolean keepTryingForAwhile)
at UltiDev.WebServer.Monitor.AppPoolControllerClient.HostProcessMonitoringLoop()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
Then I hit OK on the debugger, and it logged it successfully registered the app:
Code:
Log Name: Application
Source: UWS.RequestProcessor
Date: 3/19/2012 9:50:55 PM
Event ID: 0
Task Category: None
Level: Information
Keywords: Classic
User: N/A
Description:
Created ASP.NET AppDomain (AppDomain ID={72078d39-9860-4f7b-aadb-6cf54a714cba}) for application "[redacted]" (Application ID={redacted}).
Environment info: Command line: "C:\Program Files\UltiDev\Web Server\UWS.AppHost.Clr4.AnyCPU.exe" 53de5b13-eb66-449f-97a3-7a0f9080e649
Process ID: 12872
Process user name: NT AUTHORITY\SYSTEM
Bitness: 64
CLR version 4.0.30319.261
Process retired: False
Max request threads: 400
Max I/O threads: 400
Then the host processes shut themselves down because they didn't see the Monitor (because it crashed), then main service restarted, monitor posted a successful "Metabase caused the following changes" event, and both CLR 2 host for redirector and CLR 4 host for my app posted "Successfully registered type AppPoolHost for remote control by monitoring service. Waiting for incoming commands.".
So, looks like issue is related to NETWORK SERVICE, under .NET 4, as the Redirector is working properly under NETWORK SERVICE on .NET 2:
-Redirector-
Code:
Created ASP.NET AppDomain (AppDomain ID={f219c977-2398-4ba3-9ecd-c04ca5fd7152}) for application "UltiDev Web Server App Redirector" (Application ID={4fd8b3f7-bc73-4583-95fe-e7b69b10a3ae}).
Environment info: Command line: "C:\Program Files\UltiDev\Web Server\UWS.AppHost.Clr2.AnyCpu.exe" 4fd8b3f7-bc73-4583-95fe-e7b69b10a3ae
Process ID: 16976
Process user name: NT AUTHORITY\NETWORK SERVICE
Bitness: 64
CLR version 2.0.50727.5448
Process retired: False
Max request threads: 400
Max I/O threads: 400
-My App-
Code:
Created ASP.NET AppDomain (AppDomain ID={78f4a09a-8cd0-4f55-9b53-88f718cb6044}) for application "[redacted]" (Application ID={redacted}).
Environment info: Command line: "C:\Program Files\UltiDev\Web Server\UWS.AppHost.Clr4.AnyCPU.exe" 53de5b13-eb66-449f-97a3-7a0f9080e649
Process ID: 4716
Process user name: NT AUTHORITY\SYSTEM
Bitness: 64
CLR version 4.0.30319.261
Process retired: False
Max request threads: 400
Max I/O threads: 400
And maybe I just reported another bug regarding the crash.
This solves it here...but I'd like to get Network Service working. Or a way to install it under Local System w/ your assurance that is production quality. i.e. "run the Local System application setup if the Network Service one fails". This application is going to be deployed to non-technical customers so it is my goal to assure as much as possible that all Win7 x64 installations will work without intervention.
Halp!
Thanks!
-- Neptune