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

Cognos SDK c# - Login

Started by hendriklenz, 15 Apr 2009 11:03:28 AM

Previous topic - Next topic

hendriklenz

Hi,

i use the Cognos C# SDK. I will develop an Tool that create a List of all Reports.

I have access the the Cognos Server only via Web-Access. The Login where pass by Single-Sihn-On.
For the Single Sign On where used a special URL. When i call this URL the Login were executing and i can Start Cognos.

I can not use the example Logon of the SDK Sample because i must use this special Single-Sign On over the URL.

How can i perform the Login over the URL with the SDK and C#?

The Logon Url is:
http://agree-analysen-login.enterprise.fiducia.de/

And the COGNOS URL is:
http://agree-analysen.enterprise.fiducia.de/crn/cgi-bin/mod2_cognos.dll

When i don´t use the Logon URL and start COGOS directly the Browser show an Login Form. But i can not use the Login Form to log me in because there are some other Things that were done when the login perfom over the URL.

Thanks
Hendrik

netanel

Hi.
It seems that when you login via your URL you create a Cognos passport, but you lose it when you connect to Cognos and that's why you are prompted to log in. Try to retrieve the CAMID from your application and pass it to Cognos when connecting.

hendriklenz

Hi,

thank you for the answer.

How can i get the CAMID from the single sign on via webbrowser?
And how can i use the camid with the c# cognos login?

thanks for your hints.

hendrik

netanel

Actually, I believe your URL enables authentication only against your LDAP (and Cognos is configured to use Single-SignOn). Where it takes the credentials from - a cookie? the URL? Any how, you need to retrieve them from your authentication page, and then pass them to Cognos login (wrapped as XML of course).
I hope I understand the situation correctly...

hendriklenz

Hi,

i think the id saved in a cookie.

I found a cookie with the name "cam_passport" after i do an logon.
The cookie has this value:
101:b0c8f97d-1be7-6ab2-6c3a-f91102d8faa4:1606591855

How can i translate it to the logon code for c# (the xml-file)?

Thanks
Hendrik

netanel

Put it inside the header of the service you use.
For example, if you use an istance of contentManagerService1 called c8cms, put the id you have in
c8cms.biBusHeaderValue.CAM.CAMPassport.id

dotnetcognosdeveloper

Hi Hendrik,

Don't know if you solved this? If not, reply to this post or shoot me an email. I think I can help you out.

Cheers!

amitmca

Hi dotnetcognosdeveloper,

I am having the same issue. I do not know how to authenticate or login in ContentManagerService using Single SignOn. I am using C# and developing an app to query the Content Store

sir_jeroen

AFAIK: For the SDK to have SSO capabilities you have to create a web request using the Gateway URI.
From that webrequest you have to get the passport ID and set this in the BIBUSHeader Passport Id.

amitmca

Does that mean, I have to send a web request to the SSO enable URL using C# code. If so, does it return the PASSPORT ID in the Web Response? Thank you.

sir_jeroen

yep... that's what I would do... Pass a request to the gateway and read the response...

amitmca

Hi.. thanks for your response. I tried to send a web request but it gave me the error 'The remote server returned an error: (401) Unauthorized.' I have been stuck on this for so long and can not find the solution. There must be a way to logon using sso. If I type the same URL on the browser, it logs me in straight away but do not know how to do it using SDK...

sir_jeroen

#12
Did you pass it to the gateway (cognos8/cgi-bin/cognosisapi.dll)or the dispatcher(...:9300/p2pd/...)
Read the following:
https://www-304.ibm.com/support/docview.wss?uid=swg21343956

amitmca

Hi,

I passed it to the gateway. http://xxxx.co.uk/cognos8/cgi-bin-ss/cognosisapi.dll. cgi-bin-ss is configured for single signon. It works fine from the browser but when I try it using HttpWebRequest class using code. It throws that exception.

Amit

sir_jeroen

Have you read the provided url?

JK23

Can someone direct me to a solution where we create a ASP.NET form authentication solution that would log users into Cognos.

Reason: We currently have users that are not on domain computers and we do not want them to type domainname\username and only want them to type username and password. 

remeez

Hi JK23,

Did you find a solution to this issue, I am trying to do the same thing, we currently have it working using a jsp file which is situated on the dispatcher.  We call this jsp from our javascript and then use the cam_passport provided to execute any cognos content.  I would really like to use this using c#.

Any help will be appreciated.

Regards
Remeez