Object reference not set to an instance of an object.

Jun 8, 2011 at 1:01 PM

Hello,

I installed TFS Timesheet 4.01 add-in on Microsoft Visual Studio 2008 Team System Web Access SP1 using step by step instruction provided in readme.txt file.

I done all steps and after all when I click on Timesheet tab I see only information: "Object reference not set to an instance of an object.". What I had done wrong?

My web.config file below :

<?xml version="1.0" encoding="UTF-8"?>
<configuration>

  <configSections>
    <section name="webAccessSettings" type="Microsoft.TeamFoundation.WebAccess.Common.WebAccessSettings" />
    <section name="timesheetSettings" type="Stratman.Web.VSTS.TimesheetSettings"/>
  </configSections>

  <webAccessSettings>
    <!-- Specifies whether the login form is enabled. If disabled, only
    Integrated Windows Authentication is allowed. -->
    <formsAuthentication enabled="true" />

    <!-- Specifies whether advanced Integrated Windows Authentication options
    are enabled. -->
    <delegatedAuthentication enabled="false" />

    <!-- Specifies whether compression for dynamic content is enabled. -->
    <outputCompression enabled="true" />

    <!-- Keeps the connection to TFS alive to avoid session timeouts. -->
    <tfsKeepAlive enabled="true" />
   
    <timesheetSettings>
      <enforceConsistency enabled="false"/>
      <updateWorkItemsFromTimesheet enabled="false"/>

      <administrators>
        <add loginID="corpo\nlipi"/>
        <add key="TimesheetAdministrators" value="corpo\nlipi"/>
        <add key="TimesheetWorkAmountFields" value="Microsoft.VSTS.Scheduling.CompletedWork"/>

      </administrators>

      <timeAmounts>
        <add label="Dev" completedHoursFieldName="Microsoft.VSTS.Scheduling.CompletedWork" remainingHoursFieldName="Microsoft.VSTS.Scheduling.RemainingWork"/>
        <add label="Report" completedHoursFieldName="Microsoft.VSTS.Scheduling.CompletedWork" remainingHoursFieldName="Microsoft.VSTS.Scheduling.RemainingWork"/>
        </timeAmounts>
    </timesheetSettings>


    <connectionStrings>
      <add name="TimesheetDatabase" connectionString="Server=WPLDEV01\WPLDEV01;Database=TfsTimesheet;User ID=TimesheetUser;Password=lenovo200"/>
    </connectionStrings>
    <!-- Specifies the default Team Foundation Server to initially connect
    when Integrated Windows Authentication is enabled. When more than
    one server is specified, these servers are displayed as a selection on
    the login form. -->
    <tfServers>
      <add name="http://WPLDEV01:8080" />
    </tfServers>

    <!-- Specifies maximum number of workitems when query results are being sent as an email or viewed as a report.-->
    <maxWorkitemsInReportList count="100" />

    <!--
    Specifies whether sending query results and work items as email is enabled.
    Make sure to enable/disable mailSettings section in <system.net> below for the sender username and password
    -->
    <emailSettings sendingEmailEnabled="false" enableSsl="false" />

    <jscriptConfig>
      <add name="showBrowserToolbar" value="true" />
    </jscriptConfig>

   
  </webAccessSettings>

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.TeamFoundation.WebAccess.WorkItemTracking" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="9.0.0.0-9.0.65535.65535" newVersion="9.0.3000.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

  <!-- ** Email Settings ** -->
  <system.net>
    <mailSettings>
      <smtp deliveryMethod="network" from="sender@example.com">

        <!-- Use default credentials -->
        <network host="mail.example.com" port="25" defaultCredentials="true" />
       
        <!-- To specify a username and password, comment out the <network> section
        above, and uncomment the one below -->
        <!--<network host="mail.example.com" port="25" defaultCredentials="false" userName="username" password="password" />-->
     
      </smtp>
    </mailSettings>
  </system.net>

  <appSettings>
    <!-- Directory path where cache is stored. -->
    <add key="WorkItemTrackingCacheRoot" value="C:\Program Files\Microsoft Visual Studio 2008 Team System Web Access\Cache\Tswa" />
    <add key="TfcBin" value="C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies" />
  </appSettings>

  <system.web>

    <urlMappings enabled="true">
      <add url="~/home.aspx" mappedUrl="~/Index.aspx" />
      <add url="~/home" mappedUrl="~/Index.aspx" />

      <add url="~/allq.aspx" mappedUrl="~/UI/Pages/WorkItems/AllQueries.aspx" />
      <add url="~/qx.aspx" mappedUrl="~/UI/Pages/WorkItems/QueryExplorer.aspx" />
      <add url="~/wi.aspx" mappedUrl="~/UI/Pages/WorkItems/WorkItemEdit.aspx" />
      <add url="~/qe.aspx" mappedUrl="~/UI/Pages/WorkItems/EditQuery.aspx" />
      <add url="~/q.aspx" mappedUrl="~/UI/Pages/WorkItems/QueryResult.aspx" />
      <add url="~/qr.aspx" mappedUrl="~/UI/Pages/WorkItems/QueryResultNW.aspx" />

      <add url="~/cs.aspx" mappedUrl="~/UI/Pages/Scc/ViewChangeset.aspx" />
      <add url="~/history.aspx" mappedUrl="~/UI/Pages/Scc/History.aspx" />
      <add url="~/diff.aspx" mappedUrl="~/UI/Pages/Scc/Difference.aspx" />
      <add url="~/view.aspx" mappedUrl="~/UI/Pages/Scc/ViewSource.aspx" />
      <add url="~/ann.aspx" mappedUrl="~/UI/Pages/Scc/Annotate.aspx" />
      <add url="~/scc.aspx" mappedUrl="~/UI/Pages/Scc/Explorer.aspx" />
      <add url="~/ss.aspx" mappedUrl="~/UI/Pages/Scc/ViewShelveset.aspx" />

      <add url="~/report.aspx" mappedUrl="~/UI/Pages/Reports/Report.aspx" />
      <add url="~/reports.aspx" mappedUrl="~/UI/Pages/Reports/Explorer.aspx" />

      <add url="~/docs.aspx" mappedUrl="~/UI/Pages/Documents/Explorer.aspx" />

      <add url="~/builds.aspx" mappedUrl="~/UI/Pages/Builds/Explorer.aspx" />
    </urlMappings>

    <globalization culture="auto" uiCulture="auto" />

    <!-- For Integrated Windows Authentication, set Authentication Mode to "Windows"
    For Forms authentication, set it to None -->
    <authentication mode="Windows" />
    <!-- For Integrated Windows Authentication, enable Identity Impersonation -->
    <identity impersonate="true" />
   
    <httpRuntime executionTimeout="300" />
    <pages validateRequest="false" enableEventValidation="false" />
    <customErrors mode="On" />
    <sessionState mode="InProc" cookieless="false" timeout="30" />
    <trace enabled="false" pageOutput="false" requestLimit="40" localOnly="false" />

    <httpModules>
      <add name="CompressionModule" type="Microsoft.TeamFoundation.WebAccess.CompressionModule" />
      <add name="ReportWrapperModule" type="Microsoft.TeamFoundation.WebAccess.ReportWrapperModule" />
    </httpModules>

    <httpHandlers>
      <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
      <!--<remove verb="*" path="*.asmx" /> -->
      <add path="CachedResource.axd" verb="*" type="Microsoft.TeamFoundation.WebAccess.Controls.CachedResourceHandler" validate="false" />
      <add path="StateDiagram.axd" verb="*" type="Microsoft.TeamFoundation.WebAccess.StateDiagramHandler" validate="false" />
      <add path="SccDownload.axd" verb="*" type="Microsoft.TeamFoundation.WebAccess.SourceDownloadHandler" validate="false" />
      <add path="SccFolderDownload.axd" verb="*" type="Microsoft.TeamFoundation.WebAccess.SccFolderDownloadHandler" validate="false" />
    </httpHandlers>

    <compilation debug="false" batch="false" />

  </system.web>

  <system.diagnostics>
    <trace autoflush="true">
      <listeners>
        <add name="TeamPlainTracer" type="System.Diagnostics.TextWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
          initializeData="C:\Program Files\Microsoft Visual Studio 2008 Team System Web Access\Cache\Tswa\TswaLog.txt"/>
        <remove name="Default"/>
      </listeners>
    </trace>


    <switches>
      <add name="TSWA.General" value="Verbose"/>
      <add name="TSWA.Application" value="Verbose"/>
      <add name="TSWA.TeamFoundationServer" value="Verbose"/>
      <add name="TSWA.UserControl" value="Verbose"/>
      <add name="TSWA.Configuration" value="Verbose"/>
      <add name="TSWA.Security" value="Verbose"/>
      <add name="TSWA.API" value="Verbose"/>
    </switches>
  </system.diagnostics>

  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs" compilerOptions="/d:TRACE" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="1" />
      <compiler language="VB" extension=".vb" compilerOptions="/d:Trace=true" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    </compilers>
  </system.codedom>
    <system.webServer>
        <security>
            <authorization>
                <add accessType="Allow" users="?" />
            </authorization>
        </security>
    </system.webServer>
 
</configuration>