0
Under review

Triggers.ascx Compilation Error

Kendal 3 years ago updated 3 years ago 3

I have a Windows Server 2016 with ScreenConnect v6.2.12963 installed.

NET Frameworks Installed:
.NET Framework 2.0 Service Pack 2
.NET Framework 3.0 Service Pack 2
.NET Framework 3.5 Service Pack 1
.NET Framework 4.6.2


I am getting a Compilation Error stating that the call to an Append call is ambiguous between ScreenConnect.Extensions.Append and Systme.Linq.Enumerable.Append. 


Line Items 49 and 82 in Triggers.ascx


The following is the Version information from the error page:

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2623.0

ConnectWise Control Version:
3
Server Affected:
Host Client Affected:
Guest Client Affected:

I believe I found a fix for this issue if anyone else is having this issue.

Hello Kendal,


If you don't mind, can you please share the fix you found?

The fix is achieved by modifying the following lines in Triggers.ascx


Line 49 Before trigger.Actions = trigger.Actions.SafeEnumerate().Append((string)e.CommandArgument == "Smtp" ? (TriggerAction)new SmtpTriggerAction() : new HttpTriggerAction()).ToArray();
Line 49 After trigger.Actions = ScreenConnect.Extensions.Append(trigger.Actions.SafeEnumerate(),(string)e.CommandArgument == "Smtp" ? (TriggerAction)new SmtpTriggerAction() : new HttpTriggerAction()).ToArray();

Line 82 Before this.triggerList.DataSource = ((SessionEventTrigger[])this.triggerList.DataSource).Append(new SessionEventTrigger()).ToArray();
Line 82 After this.triggerList.DataSource = ScreenConnect.Extensions.Append((SessionEventTrigger[])this.triggerList.DataSource,new SessionEventTrigger()).ToArray();