Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Guest
  •  MHIO
  • No customer Topic Starter
2014-11-18T21:24:14Z
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
Sponsor
Forum information
Support
2014-11-19T09:53:54Z
Can you please test this version to see if the problem is resolved?

http://www.visualcron.co....aspx?g=posts&t=4676 
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
  •  MHIO
  • No customer Topic Starter
2014-11-19T19:15:41Z
Upgraded to 7.5.2 Beta. Still having this issue.
Guest
  •  MHIO
  • No customer Topic Starter
2014-12-31T14:32:21Z
Still having this issue, but discovered a work around.
If the PowerShell task writes the output to a file instead of to the output/console, and a subsequent task reads in the file, everything works as intended.
Would still love to see a solution that doesn't require temporary files.
i.e.
This code produces the error:
$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

But this code does not:
$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 | Out-File "S:\CustomerData\FTPRootFiles.txt"
Support
2015-01-12T08:32:54Z
I find this strange. We just tested reading a 20k file and output it. No problem.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top