IBM Support

Error 'System.NullReferenceException: Object reference not set to an instance of an object' when launching Controller on new installation, caused by ASP.NET identity security problem

Troubleshooting


Problem

Administrator is trying to test a new Controller installation. User launches Controller. User receives error message.

Symptom

Screen:

    System.NullReferenceException: Object reference not set to an instance of an object.
    at Cognos.Controller.AppContext.InitConfig()

Cause

There are many potential causes for this same error. For a description of all of them, please see separate IBM Technote #1367356.

This Technote specifically relates to the scenario where the webserver's ASP.NET configured identity (Windows account) does not have sufficient permissions.

Diagnosing The Problem

To be sure that you are suffering from the problem in this Technote, launch the following website: http://<servername>/cognos8/controllerserver/ccrws.asmx.

In this Technote's scenario, you will receive an error message similar to the following:

    Server Error in '/cognos8/controllerserver' Application.
    --------------------------------------------------------------------------------
    The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.HttpException: The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.

If the problem is caused by having a mixture of English and German Windows/Microsoft.NET, then the error message may be similar to:
    Server Error in '/cognos8/controllerserver' Application.
    The current identity (NT-AUTORITAT\NETZWEKDIENST) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.
    Description: An unhandled exception occurred during the execution of the current web request...

Resolving The Problem

Choose the most appropriate solution (for your environment) from the choices below:

Solution#1 - Change the ASP.NET identity user to a different identity (which has sufficient rights)

    1. Logon to the Controller webserver as an administrator
    2. Right-click on 'My Computer' and choose 'manage'
    3. Expand 'Services and Applications'
    4. Expand 'Internet Information Services (IIS) Manager'
    5. Expand 'Application Pools'
    6. Right-click on 'DefaultAppPool' and choose 'properties'
    7. Click on 'Identity' tab
    8. Modify the setting from the current (default = predefined "Network Service") to an appropriate value (for example predefined "Local System")
    9. Click OK, OK.
    10. Restart IIS (or reboot entire application server)

Solution#2 - Register the existing ASP.NET identity user (default identity = "NT AUTHORITY\NETWORK SERVICE") to have sufficient rights for ASP.NET

  1. Logon to the Controller webserver as an administrator
  2. START - RUN - "CMD" <Enter>
  3. c:
  4. cd %windir%
  5. cd microsoft.net
  6. cd framework
  7. cd v2.0.50727
  8. aspnet_regiis -ga "NT AUTHORITY\NETWORK SERVICE"

[{"Product":{"code":"SS9S6B","label":"IBM Cognos Controller"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Controller","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.4;8.3;8.2","Edition":"Not Applicable","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 June 2018

UID

swg21386247