Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Error message when you try to open a report in Microsoft Dynamics CRM 3.0: "ASP.NET ViewState has been disabled. The Report Viewer control requires that ViewState be enabled"


View products that this article applies to.

Symptoms

When you try to open a report in Microsoft Dynamics CRM 3.0, you receive the following error message:
ASP.NET ViewState has been disabled. The Report Viewer control requires that ViewState be enabled.

↑ Back to the top


Cause

This problem occurs because the virtual reporting folders inherit the viewstate object from the root directory in which the viewstate object is installed.

↑ Back to the top


Resolution

To resolve this problem, use Notepad to open the Web.config file that is in the root directory, and then add the following script between the <Configuration> tag and the </Configuration> tag.

Note The location path must be one of the Microsoft SQL Server Reporting Services (SSRS) virtual directories. By default, the SSRS virtual directories are named "ReportServer" and "Reports."
<location path="ReportServer">
<system.web>
<pages enableSessionState="true" validateRequest="false" enableViewState="true" />
</system.web>
</location>

<location path="Reports">
<system.web>
<pages enableSessionState="true" validateRequest="false" enableViewState="true" />
</system.web>
</location>
You may have to update the Web.config file of the Microsoft Dynamics CRM 3.0 Web site if the following conditions are true:
  • The SSRS virtual directories are installed on the Microsoft Dynamics CRM 3.0 Web site.
  • The SSRS virtual directories do not use default SSRS virtual directory names.
For example, the following script represents the default SSRS support in the Microsoft Dynamics CRM 3.0 Web.config file:
<!--
Support for SQL Reporting services
-->
<location path="Reports">
<system.web>
<compilation defaultLanguage="C#" debug="true">
<assemblies>
<remove assembly="Microsoft.Crm, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove assembly="Microsoft.Crm.Entities, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove assembly="Microsoft.Crm.ManagedInterop, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove assembly="Microsoft.Crm.MetadataHelper, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove assembly="Microsoft.Crm.MetadataService, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove assembly="Microsoft.Crm.NativeInteropProxy, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove assembly="Microsoft.Crm.ObjectModel, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove assembly="Microsoft.Crm.Platform.ComProxy, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove assembly="Microsoft.Crm.Platform.Proxy, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove assembly="Microsoft.Crm.Platform.Server, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove assembly="Microsoft.Crm.Platform.Sdk, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove assembly="Microsoft.Crm.Platform.Types, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove assembly="Microsoft.Crm.Scheduling, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove assembly="Microsoft.Crm.Tools.ImportExportPublish, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>
<pages enableSessionState="true" validateRequest="false" enableViewState="true" />
</system.web>
</location>
<location path="ReportServer">
<system.web>
<pages enableSessionState="true" validateRequest="false" enableViewState="true" />
</system.web>
</location>
You may have to change the location path in the script from ReportServer to the actual URL of the report server that you use. Additionally, you may have to change the location path in the script from Reports to the actual URL of the reports that you use.

↑ Back to the top


Keywords: KB941443, kbmbsreports, kbexpertiseinter, kbprb, kbmbsmigrate, kbtshoot, kbexpertisebeginner, kberrmsg

↑ Back to the top

Article Info
Article ID : 941443
Revision : 3
Created on : 3/5/2008
Published on : 3/5/2008
Exists online : False
Views : 232