I have encountered event error 1309 now on 3 of my clients' Remote Desktop Services (Server 2008 R2) servers.
Typical Environment - single remote desktop services server running 4 services:
- RemoteApp Manager
- RD Gateway Manager
- RD Session Host Configuration
- Remote Desktop Services Manager
Out of all our client deployments of this configuration, I have have three servers that event 1309 errors. The first time it happened, we searched forums and KB articles but could find no solution.
It appears that this is some kind of permissions issue for the Application Pool: RDWebAccess
The default Identity: ApplicationPoolIdentity no longer seems to have enough permissions to allow RDWeb to function.
Our workaround solution was to assign a domain administrator account to the application pool identity. As soon as we do that, our clients' users can log into RDWeb, and run their application.
But, I'm not really happy with that workaround. What can cause this permissions problem and how do I resolve it without having to use a domain admin identity on the Application Pool?
-----------------------------
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 9/16/2013 9:27:32 AM
Event time (UTC): 9/16/2013 1:27:32 PM
Event ID: c5053d16bbf34f24b69cdcae258a5d2c
Event sequence: 7
Event occurrence: 2
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT/RDWeb/Pages-2-130238112945388829
Trust level: Full
Application Virtual Path: /RDWeb/Pages
Application Path: C:\Windows\Web\RDWeb\Pages\
Machine name: TEST
Process information:
Process ID: 5212
Process name: w3wp.exe
Account name: IIS APPPOOL\RDWebAccess
Exception information:
Exception type: ExternalException
Exception message: Cannot execute a program. The command being executed was "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\csc.exe" /noconfig /fullpaths @"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET
Files\rdweb_pages\decbd09c\9f1642a3\vnpcuj0o.cmdline".
Request information:
Request URL: https://test.domain.com:443/RDWeb/Pages/default.aspx
Request path: /RDWeb/Pages/default.aspx
User host address: 192.168.1.67
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\RDWebAccess
Thread information:
Thread ID: 11
Thread account name: IIS APPPOOL\RDWebAccess
Is impersonating: False
Stack trace: at System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName,
String trueCmdLine)
at System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at Microsoft.CSharp.CSharpCodeGenerator.Compile(CompilerParameters options, String compilerDirectory, String compilerExe, String arguments, String& outputFile, Int32& nativeReturnValue, String trueArgs)
at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames)
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile(CompilerParameters options, String[] fileNames)
at System.Web.Compilation.AssemblyBuilder.Compile()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)