Get Currently Opened Session Info

32 views
Skip to first unread message

Patricia Limcangco

unread,
Mar 13, 2017, 10:34:27 AM3/13/17
to SmartAPI
Hello, 
I am currently using the code below to create a session for a plugin:


 var authData = new PasswordAuthentication("username", "password");
            var url = "http://cms.ca/cms/";

            var login = new ServerLogin(url, authData);               
            
            Guid loginGuid = "" ;
           
            string sessionKey = "";
            Guid projectGuid = new Guid("string");

            //create a sessionBuilder object
            var sessionBuilder = new SessionBuilder(login, loginGuid, sessionKey, projectGuid);            
            var session = sessionBuilder.CreateSession();

The loginGUID, sessionKey, and project GUID are all hard-coded, taking the information from an opened session on RedDot but I would like to get the information dynamically. 
Is there a way to do that? 

Thank you

Jonas Jacobi

unread,
Mar 13, 2017, 11:06:42 AM3/13/17
to SmartAPI

The usual way for us is to create a web application for the logic and very simple  .asp page for your plugin which you register in the CMS as plugin.

The asp page then reads out those values from the asp.net session and calls the web application with that information.

If you need more info, please let me know.


Cheers

Jonas


Von: smar...@googlegroups.com <smar...@googlegroups.com> im Auftrag von Patricia Limcangco <trici...@gmail.com>
Gesendet: Montag, 13. März 2017 15:34:27
An: SmartAPI
Betreff: [SmartAPI] Get Currently Opened Session Info
 
--
More information about SmartAPI: http://www.smartapi.de
---
Sie erhalten diese Nachricht, weil Sie in Google Groups E-Mails von der Gruppe "SmartAPI" abonniert haben.
Wenn Sie sich von dieser Gruppe abmelden und keine E-Mails mehr von dieser Gruppe erhalten möchten, senden Sie eine E-Mail an smartapi+u...@googlegroups.com.
Wenn Sie in dieser Gruppe einen Beitrag posten möchten, senden Sie eine E-Mail an smar...@googlegroups.com.
Weitere Optionen finden Sie unter https://groups.google.com/d/optout.

Patricia Limcangco

unread,
Mar 14, 2017, 5:15:53 PM3/14/17
to SmartAPI
Can you possibly provide an example of that asp page that retrieves the values? 

Thank you,

Patricia

Hilmar Bunjes

unread,
Mar 15, 2017, 2:02:42 AM3/15/17
to smar...@googlegroups.com
Patricia,
this way you can get the session vars from ASP via VBScript to show on a website (the value is already URL encoded for handing it over to e.g. an ASP.NET page):


<%
For Each Item In Session.Contents
   Response.Write(Item & "=" & server.URLencode(Session.Contents(item)) &"<br>")
Next
%>


Best
Hilmar
Reply all
Reply to author
Forward
0 new messages