Session ID

オフライン

Is there a way I can retrieve the current session id from a method?

Parents
  • That didn't work. Here is the code Below is the code I'm trying to use it for:

    string xx = CStr(CCO.Session("arasSESSID"));
    for (int i = 0 ; i<this.getItemCount() ; i++)
    {
        Item currentW = this.getItemByIndex(i);
            String SQL = "Select (SELECT TOP(1) MIN_PORTAL_STORE_ACCOUNTS.CONTACT_ID FROM MIN_PORTAL_STORE_ACCOUNTS WHERE MIN_PORTAL_STORE_ACCOUNTS.SESSION_ID = " +  "'" + xx + "'" + ")" + " as nb";
            SQL = String.Format(SQL,currentW.getProperty("config_id","error"));
            Item res = currentW.getInnovator().applySQL(SQL);

            if (!res.isError())
            {
                string nb = res.getProperty("nb","");
                currentW.setProperty("id",nb);
            }
    }

    return this;

  • CStr is a VB function, not a C# function. Use something like this: CCO.Session["arasSESSID"].ToString();

    My first post showed a variant to get the ASP.NET_SessionId as stored in the cookies. Where did you find the information about "arasSESSID!? Which session id does this one reference to? Can you give some insights to your use case?

    Thanks!

  • 0 オフライン in reply to AngelaIp

    Thanks Angela, that worked. It also works if I rewrite my code to VB using CStr(CCO.Session("arasSESSID")). The arasSESSID retrieves the current session id. TY!

Reply Children
No Data