Hi
I have a couple of powershell tasks now that return a fairly long output (>10,000 characters). These tasks are failing due to a "Maximum String Content Length Quota" being exceeded. I can't figure out how to increase this maximum.
We are running 7.5.0
Powershell script:
$a = "<style>"
$a = $a + "BODY{background-color:grey;}"
$a = $a + "TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}"
$a = $a + "TH{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:#4F81BD}"
$a = $a + "TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:white}"
$a = $a + "</style>"
cd \\mhapp1\ftproot
Dir -r | where {!$_.PsIsContainer} | Select Directory, Name, LastWriteTime | Sort Directory, LastWriteTime | ConvertTo-Html -head $a
Output:
09:17:37: Server->Execute path: C:\Program Files\VisualCron\\TaskPowerShell.exe
09:17:37: Server->Executing Task process
09:17:38: ExecuteProcess("C:\Program Files\VisualCron\\TaskPowerShell.exe" 2291295)->CreateService->Response channel created on address: /TaskProcess/2291295
09:17:38: ExecuteProcess("C:\Program Files\VisualCron\\TaskPowerShell.exe" 2291295)->Requesting Task information
09:17:38: Server->Sending Task information
09:17:38: ExecuteProcess("C:\Program Files\VisualCron\\TaskPowerShell.exe" 2291295)->Task information sent
09:17:38: ExecuteProcess("C:\Program Files\VisualCron\\TaskPowerShell.exe" 2291295)->Assembly loaded: System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
09:17:38: ExecuteProcess("C:\Program Files\VisualCron\\TaskPowerShell.exe" 2291295)->Task information received
09:17:38: ExecuteProcess("C:\Program Files\VisualCron\\TaskPowerShell.exe" 2291295)->Before PowerShell execution
09:17:38: Server->Task information sent
09:17:38: ExecuteProcess("C:\Program Files\VisualCron\\TaskPowerShell.exe" 2291295)->Assembly loaded: System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
09:17:38: ExecuteProcess("C:\Program Files\VisualCron\\TaskPowerShell.exe" 2291295)->Assembly loaded: VisualCronAPI, Version=1.0.3.23712, Culture=neutral, PublicKeyToken=55f7a52402de1c04
09:17:38: ExecuteProcess("C:\Program Files\VisualCron\\TaskPowerShell.exe" 2291295)->Assembly loaded: Microsoft.PowerShell.Commands.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
09:17:38: ExecuteProcess("C:\Program Files\VisualCron\\TaskPowerShell.exe" 2291295)->Assembly loaded: System.Configuration.Install, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
09:17:38: ExecuteProcess("C:\Program Files\VisualCron\\TaskPowerShell.exe" 2291295)->Assembly loaded: Microsoft.WSMan.Management, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Error Output:
09:17:43: ExecuteProcess("C:\Program Files\VisualCron\\TaskPowerShell.exe" 2291295)->ProcessUnhandledException: System.UnhandledExceptionEventArgs( at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at R6PIo5tp5NqnnVHByr.HNZTVdjxhw6gdDT9Cm.W9CDmS6PI(Object , UnhandledExceptionEventArgs )
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at VisualCron.ITaskService.ProcessTaskResult(Int32 VCTaskPId, ProcessTaskResult ptr)
at R6PIo5tp5NqnnVHByr.HNZTVdjxhw6gdDT9Cm.r95QkoDAq(String[] ))
Unhandled Exception: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter
http://tempuri.org/:ptr . The InnerException message was 'There was an error deserializing the object of type VisualCron.ProcessTaskResult. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader.'. Please see InnerException for more details.
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at VisualCron.ITaskService.ProcessTaskResult(Int32 VCTaskPId, ProcessTaskResult ptr)
at R6PIo5tp5NqnnVHByr.HNZTVdjxhw6gdDT9Cm.r95QkoDAq(String[] )
Exception in Task: Non zero exit code
Exception in Task: Non zero exit code