Joseph Michael Pesch
VP Programming

MS CRM Custom ASPX Page Error: "Input string was not in a correct format."

by 25. August 2010 14:52

When using a custom page in MS CRM, postback calls may fail with this error: "Input string was not in a correct format.".  This is because by default the CRM web.config file will have the following entry:

<pages buffer="true" enableSessionState="false" enableViewState="false" validateRequest="false" />

To fix the issue, either change the enableViewState entry in web.config (from false to true); or, add EnableViewState directive to the ASPX page (as shown below):

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MyCustomPage.aspx.cs"

  Inherits="MyCustomizations.MyCustomPage" EnableViewState="true" %>




Comments are closed