How to track the time of the current session in run-time?

Hi guys,


Is there a mechanism to track down how much time is left for the current session in the run-time?

I'm talking about the Outsystems Cloud Sever Session, not the browser session.


Thanks,

AY

Hi Andy,

I'm not sure if there's already a component in the forge for this but you can always make a simple one based on this article from Outsystems:

Link to article HERE.


Using that as a base you can check the variable HttpContext.Timestamp for the timestamp of the session and compare it with the current date time.


Hope this gives you some guidance to solve your problem.

Ricardo Antunes wrote:

Hi Andy,

I'm not sure if there's already a component in the forge for this but you can always make a simple one based on this article from Outsystems:

Link to article HERE.


Using that as a base you can check the variable HttpContext.Timestamp for the timestamp of the session and compare it with the current date time.


Hope this gives you some guidance to solve your problem.

Hi,

I have successfully created the .NET extension module (step 1) and edited the source code (step 2), but when I 1-click publish the extension (step 3) I get the following compiler error(s):

.NET Compilation.

Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333.

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3274: The primary reference "OutSystems.RuntimeCommon" could not be resolved because it was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3275: The primary reference "OutSystems.HubEdition.RuntimePlatform" could not be resolved because it has an indirect dependency on the assembly "OutSystems.RuntimeCommon, Version=11.0.212.0, Culture=neutral, PublicKeyToken=null" which was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3275: The primary reference "OutSystems.REST.API" could not be resolved because it has an indirect dependency on the assembly "OutSystems.RuntimeCommon, Version=11.0.212.0, Culture=neutral, PublicKeyToken=null" which was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3275: The primary reference "OutSystems.SOAP.API" could not be resolved because it has an indirect dependency on the assembly "OutSystems.RuntimeCommon, Version=11.0.212.0, Culture=neutral, PublicKeyToken=null" which was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3275: The primary reference "OutSystems.HubEdition.DatabaseAbstractionLayer" could not be resolved because it has an indirect dependency on the assembly "OutSystems.RuntimeCommon, Version=11.0.212.0, Culture=neutral, PublicKeyToken=null" which was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3274: The primary reference "OutSystems.HubEdition.RuntimePlatform" could not be resolved because it was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3275: The primary reference "OutSystems.REST.API" could not be resolved because it has an indirect dependency on the assembly "OutSystems.HubEdition.RuntimePlatform, Version=11.0.212.0, Culture=neutral, PublicKeyToken=null" which was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3275: The primary reference "OutSystems.SOAP.API" could not be resolved because it has an indirect dependency on the assembly "OutSystems.HubEdition.RuntimePlatform, Version=11.0.212.0, Culture=neutral, PublicKeyToken=null" which was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3274: The primary reference "OutSystems.HubEdition.DatabaseAbstractionLayer" could not be resolved because it was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3275: The primary reference "OutSystems.HubEdition.RuntimePlatform" could not be resolved because it has an indirect dependency on the assembly "OutSystems.HubEdition.DatabaseAbstractionLayer, Version=11.0.212.0, Culture=neutral, PublicKeyToken=null" which was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3275: The primary reference "OutSystems.REST.API" could not be resolved because it has an indirect dependency on the assembly "OutSystems.HubEdition.DatabaseAbstractionLayer, Version=11.0.212.0, Culture=neutral, PublicKeyToken=null" which was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3275: The primary reference "OutSystems.SOAP.API" could not be resolved because it has an indirect dependency on the assembly "OutSystems.HubEdition.DatabaseAbstractionLayer, Version=11.0.212.0, Culture=neutral, PublicKeyToken=null" which was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3274: The primary reference "OutSystems.REST.API" could not be resolved because it was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3274: The primary reference "OutSystems.SOAP.API" could not be resolved because it was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3275: The primary reference "OutSystems.HubEdition.RuntimePlatform" could not be resolved because it has an indirect dependency on the assembly "Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" which was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3275: The primary reference "OutSystems.REST.API" could not be resolved because it has an indirect dependency on the assembly "Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" which was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3275: The primary reference "OutSystems.SOAP.API" could not be resolved because it has an indirect dependency on the assembly "Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" which was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

Interface.cs(4,18): error CS0234: The type or namespace name 'HubEdition' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Structures.cs(6,18): error CS0234: The type or namespace name 'ObjectKeys' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Structures.cs(7,18): error CS0234: The type or namespace name 'RuntimeCommon' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Structures.cs(8,18): error CS0234: The type or namespace name 'HubEdition' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Structures.cs(9,18): error CS0234: The type or namespace name 'HubEdition' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Structures.cs(10,18): error CS0234: The type or namespace name 'Internal' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Entities.cs(6,18): error CS0234: The type or namespace name 'ObjectKeys' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Entities.cs(7,18): error CS0234: The type or namespace name 'RuntimeCommon' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Entities.cs(8,18): error CS0234: The type or namespace name 'HubEdition' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Entities.cs(9,18): error CS0234: The type or namespace name 'HubEdition' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Entities.cs(10,18): error CS0234: The type or namespace name 'Internal' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Records.cs(7,18): error CS0234: The type or namespace name 'ObjectKeys' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Records.cs(8,18): error CS0234: The type or namespace name 'RuntimeCommon' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Records.cs(9,18): error CS0234: The type or namespace name 'HubEdition' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Records.cs(10,18): error CS0234: The type or namespace name 'HubEdition' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Records.cs(11,18): error CS0234: The type or namespace name 'Internal' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

RecordLists.cs(7,18): error CS0234: The type or namespace name 'ObjectKeys' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

RecordLists.cs(8,18): error CS0234: The type or namespace name 'RuntimeCommon' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

RecordLists.cs(9,18): error CS0234: The type or namespace name 'HubEdition' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

RecordLists.cs(10,18): error CS0234: The type or namespace name 'HubEdition' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

RecordLists.cs(11,18): error CS0234: The type or namespace name 'Internal' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

RecordLists.cs(12,18): error CS0234: The type or namespace name 'HubEdition' does not exist in the namespace 'OutSystems' (are you missing an assembly reference?)

Does anyone know what might be causing this issue ?  I have updated to the latest version of the .NET SDK (4.8) but I'm unable to located any .NET framework later than 4.0 on my C: drive.

Cheers, Richard.