59
Views
3
Comments
Scheduler Service: Error Executing Request

Hi all,

I schedule a timer every 5 minutes.

The timer will allowed to connect to remote server to retrieve some data.

There is a inconsistent behaviour: sometimes the timer works fine but the rest of the time I receive on Service Center the following error message.

The error works fine on Development Environment and it doesn't works in Test Environment.

Someone can help me?



Scheduler Service: Error executing request http://127.0.0.1:80/ModuleName for Timer LaunchNewTimer. Request duration = 0 secs. [Timer failed before starting: please check if there are any errors in this module]

Environment Information

eSpaceVer: Id=0, PubId=0, CompiledWith=11.17.1.36834

RequestUrl:  (Method: )

AppDomain: Scheduler.exe

Path: D:\...\PS\Scheduler\

Locale:

DateFormat: yyyy-M-d

PID: 4724 ('Scheduler', Started='11/20/2024 3:17:29 PM', Priv=63Mb, Virt=4823Mb)

TID: 12

Thread Name: Timer Processor #1

.NET: 4.0.30319.42000

Stack

Scheduler Service: Error executing request http://127.0.0.1:80/ModuleName for Timer LaunchNewTimer. Request duration = 0 secs. [Timer failed before starting: please check if there are any errors in this module]

Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.

The request failed with the error message:

--

<!DOCTYPE html>

<html>

    <head>

        <title>Could not load file or assembly 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform' or one of its dependencies. Access is denied.</title>

        <meta name="viewport" content="width=device-width" />

        <style>

         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}

         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

         pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}

         .marker {font-weight: bold; color: black;text-decoration: none;}

         .version {color: gray;}

         .error {margin-bottom: 10px;}

         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:pointer; }

         @media screen and (max-width: 639px) {

          pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }

         }

         @media screen and (max-width: 479px) {

          pre { width: 280px; }

         }

        </style>

    </head>

 

    <body bgcolor="white">

 

            <span><H1>Server Error in '/ModuleName' Application.<hr width=100% size=1 color=silver></H1>

 

            <h2> <i>Could not load file or assembly 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform' or one of its dependencies. Access is denied.</i> </h2></span>

 

            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

 

            <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

 

            <br><br>

 

            <b> Exception Details: </b>System.IO.FileLoadException: Could not load file or assembly 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform' or one of its dependencies. Access is denied.<br><br>

 

            <b>Source Error:</b> <br><br>

 

            <table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code>

 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.                      </code>

 

                  </td>

               </tr>

            </table>

 

            <br>

 

            <b>Assembly Load Trace:</b> The following information can be helpful to determine why the assembly 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform' could not be loaded.<br><br>

 

            <table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>

 

WRN: Assembly binding logging is turned OFF.

To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging.

To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

</pre>                      </code>

 

                  </td>

               </tr>

            </table>

 

            <br>

 

            <b>Stack Trace:</b> <br><br>

 

            <table width=100% bgcolor="#ffffcc">

               <tr>

                  <td>

                      <code><pre>

 

[FileLoadException: Could not load file or assembly 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform' or one of its dependencies. Access is denied.]

 

[FileLoadException: Could not load file or assembly 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=******' or one of its dependencies. Access is denied.]

   System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0

   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +232

   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +113

   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +23

   System.Reflection.Assembly.Load(String assemblyString) +35

   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +49

 

[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=******' or one of its dependencies. Access is denied.]

   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +762

   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +259

   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +167

   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +238

   System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +78

   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +334

   System.Web.Compilation.BuildManager.ExecutePreAppStart() +178

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

 

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=******' or one of its dependencies. Access is denied.]

   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552

   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122

   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +737

</pre>                      </code>

 

                  </td>

               </tr>

            </table>

 

            <br>

 

            <hr width=100% size=1 color=silver>

 

            <b>Version Information:</b> Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4718.0

 

            </font>

 

    </body>

</html>

<!--

[FileLoadException]: Could not load file or assembly 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform' or one of its dependencies. Access is denied.

[FileLoadException]: Could not load file or assembly 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=******' or one of its dependencies. Access is denied.

   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)

   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

   at System.Reflection.Assembly.Load(String assemblyString)

   at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)

[ConfigurationErrorsException]: Could not load file or assembly 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=*****' or one of its dependencies. Access is denied.

   at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)

   at System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()

   at System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai)

   at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)

   at System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies()

   at System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded)

   at System.Web.Compilation.BuildManager.ExecutePreAppStart()

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

[HttpException]: Could not load file or assembly 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=****' or one of its dependencies. Access is denied.

   at System.Web.HttpRuntime.FirstRequestInit(HttpContext context)

   at System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)

   at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)

-->

--.

 

   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

   at OutSystems.Scheduler.Core.TimerHandler.ExecuteTimer(String ssKey, Int32 timeout, Int32 tenantId)

   at OutSystems.Scheduler.Core.TimerJob.Execute()

  at OutSystems.Scheduler.Core.SchedulerProducerConsumer`1.Execute(Job job)


2024-03-22 09-17-23
Chandra Vikas Sharma

Hi ,

It's seems module is not deployed properly in dev to test environment.may be some dependency is missing related to that module. Please Try to debug module in test environment.

Thanks 

Cv

2019-01-07 16-04-16
Siya
 
MVP

It looks like the HTML error message is coming from the remote server and not from OutSystems. When the timer is invoked the executed server action might be expecting data in some format ( jSON ) but rather it is getting an exception in the form of HTML and hence  it raise an exception and the timer is failing. 

You can see an error "at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse"

2019-04-09 00-57-55
carl ruhle

Hi Jannet,

there are access denied information, are the right access given? 

Has @Chandra Vikas Sharma says do a trace on the test environment .

Also make sure that the deployment was successful. 

Regards 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.