If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Cognosviewer is still asking User credential after setting cookie (C#)

Started by cognosJ, 27 Jan 2010 09:53:26 AM

Previous topic - Next topic

cognosJ

Hi,

I am currently working on integrating Cognos SDK with our ASP.NET Web Application.

I successfully connected to a dispatch server using the supplied credential (following the steps from SDK's sampleconnect.cs example)

However, I tried adding the bibusinessheader's campassport to the cookie so that when I execute a report (cognos cgi gateway) through a URL, the cognosviewer would not recognize the campassport and instead popup the standard logon entry.

Here is the code:

Button Click event's code behind:

//add the CAMPassport id to the cookie
string passport = _cognosConnect.C8CMS.biBusHeaderValue.CAM.CAMPassport.id;
HttpCookie cookie = new HttpCookie("cam_passport", passport);
cookie.Path = "/";
cookie.Expires = DateTime.Now.AddDays(1);
Response.Cookies.Add(cookie);                       

//call the url
Response.Redirect("http://[server]/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=run&ui.object=%2fcontent%2ffolder/...and so on");

Thanks for the help.


javelina93

Did you ever figure out what the problem was? I just started using Cognos and am having the same problem. :-(

jacobsk

Don't know if you figured this out.
the reason you get a login screen is, cognos URL put another cookie called cam_passport but with a different path, mine is /cognos8. if you had created the cookie ,cam_passport, with the same path as what its trying to put you would have been ok i guess.

bpetty

I always put my passport in the URL as an argument instead of cookies.  It will definitely pick it up then.