Buy the Cognos SDK Guide by BI Centre Now

The Cognos SDK Guide by BI Centre provides you with the complete source code for a C# web solution, C8.1 report based on the GOSR package, and a Word document that will serve as your core reference to understanding the Cognos 8 SDK. It will cover C8 SDK topics such as: authentication; querying the Cognos content store; rendering a C8 report in ASP.NET; exception handling; and much more.

Buy the Cognos 8 Modification Check Now

Monday, January 14, 2008

Cognos SDK Guide by BI Centre -- web.config

Here is a concise definition for a web.config file from wikipedia.

Source:  wikipedia

“The web.config is the main settings and configuration file for an ASP.NET web application. The file is a text based XML document that defines such things as connection strings to any databases the application uses, the default language for child pages, whether debugging is allowed and how it can be implemented, whether session state is used by default, what type of authentication is used, if any, and so on.

Web.config files can only be placed inside directories that have been configured as ASP.NET applications, commonly the web application's root directory. Web.config files inherit properties from higher level .config files and ultimately machine.config however some settings inside machine.config cannot be overridden.

The web.config file is so central to the ASP.NET framework that when the file is saved, IIS restarts the application it belongs to. Visual Studio will automatically create a web.config file when needed, such as compiling a web application to run in debug mode.”

Our web application will be mainly using the web.config for storing the default login credentials for an Administrator user, the dispatcher value and the includes folder for any JavaScript or images.



      <add key="CTSpwd" value="admin1234" />

      <add key="CTSuid" value="administrator" />

      <add key="CNmspace" value="1101" />

      <add key="CCurl" value="http://server/cognos8/cgi-bin/cognosisapi.dll?;m=portal/cc.xts&amp;CAMUsername=CC_UID&amp;CAMPassword=CC_PWD&amp;h_CAM_action=logonAs&amp;CAMNamespace=CC_NM" />

      <add key="CognosSDKPathIncludes" value="http://server/cognos8/" />

      <add key="CognosDispatcher" value= "http://server:9300/p2pd/servlet/dispatch" />

      <add key="CSTypePkg" value="packageConfiguration" />

      <add key="CSTypeRpt" value="report" />




The C# code uses the following syntax to retrieve the value stored in the web.config.


_dispC8 = ConfigurationSettings.AppSettings["CognosDispatcher"];


You can see that this value corresponds to the web.config setting.


<add key="CognosDispatcher" value= "http://MyServerName:9300/p2pd/servlet/dispatch" />



Cognos 8 SDK google search


New C8 SDK Utility --- Cognos 8 Modification Check

The BI Centre C8 Modification Check provides a Cognos SDK developer with a workable C# solution that will allow you to:

· Search the Content Store for items that have been modified after a selected date value

For example, if you were looking for all reports that were modified on June 3rd, 2008 then you would select the date June 2nd, 2008. The code will search for all items that have been modified after the selected date value from the date control.

The results of the search are then rendered to a text box control.