on 05-20-2009 8:04 PM
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
Elaine is correct.
You can only use a logon token if you are trying to log into the Java Infoview.
Jason
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.