cancel
Showing results for 
Search instead for 
Did you mean: 

BOXI 3.1 InfoView "Logon denied: Your session is not valid or has expired"

Former Member
0 Kudos

I am trying to prefrom a single signon from my web application to the InfoView web application. I am using Visual Studio 2008 and C#. The web applications are located on different servers. The InfoView application is ASP.NET I have found several samples but they all seem to be java samples. I have the following code and when I am redirected to the InfoView web page I get the error "Logon denied: Your session is not valid or has expired". I have done similar code for the OpenDocument URL and that works but I cannot get this to work. Any help would be greatly appriciated.

// Start Code Snipit

string boxiServer = "Name of the BOXI Server";

SessionMgr sessionManager = new CrystalDecisions.Enterprise.SessionMgr();

EnterpriseSession enterpriseSession = sessionManager.Logon("User Login", "User Password", boxiServer, "secEnterprise");

string token = enterpriseSession.LogonTokenMgr.CreateLogonTokenEx("", 120, 100);

Response.Redirect(string.Format("http://BOXISERVER/InfoviewApp/Logon/Start.aspx?ivsLogonToken=", token), false);

// End Code Snipit

Accepted Solutions (1)

Accepted Solutions (1)

former_member184995
Active Contributor
0 Kudos

Elaine is correct.

You can only use a logon token if you are trying to log into the Java Infoview.

Jason

regis_korsakissok
Discoverer
0 Kudos

Do you have the same code for a jsp page, please?

I cannot make it work to log to the Infoview main page.it is probably a cookie or token problem, but i cant solve it.

Thank You.

Régis.

former_member184995
Active Contributor
0 Kudos

Regis,

Please create a new thread for your question.

Be sure to specify that language you are using, what version of Enterprise, and which Infoview you are trying to connect to.

Jason

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello, Rex;

You cannot logon to InfoView using the URL and a token. You need to create an Identity cookie on the infoview side similar to the following:

Create an aspx page with the following code:
           CrystalDecisions.Enterprise.SessionMgr sessMgr = new CrystalDecisions.Enterprise.SessionMgr(); 
          //Log onto Enterprise and create an EnterpriseSession
           CrystalDecisions.Enterprise.EnterpriseSession enterpriseSession;
           enterpriseSession = sessMgr.Logon("Administrator", "", System.Environment.MachineName.ToString(), "secEnterprise");
        
           //Create a CrystalIdentity object, set the EnterpriseSession and store in session 
           BusinessObjects.Enterprise.Infoview.Common.CrystalIdentity identity;
           identity = new BusinessObjects.Enterprise.Infoview.Common.CrystalIdentity();
           identity.Session = enterpriseSession;
           HttpContext.Current.Session.Add("INFOVIEW_SESSION", identity);
           
           //Create the InfoViewdotnetses cookie which holds the SerializedSession
           HttpCookie InfoViewdotnetses = new HttpCookie("InfoViewdotnetses");
           InfoViewdotnetses.Value = Server.UrlEncode(enterpriseSession.SerializedSession.ToString());
           InfoViewdotnetses.Path = @"/";
           Response.Cookies.Add(InfoViewdotnetses);
           Response.Redirect("logon.aspx");

Place this page in the InfoViewApp folder (C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\Web Content\InfoViewApp\InfoViewApp

Let me know if that is what you are looking for.

Elaine

Edited by: Elaine Dove on May 21, 2009 10:04 AM