Internal Server Error on ViewCases.aspx

May 27, 2010 at 9:12 AM

There seems to be an internal server error 500 generated through the viewcases.aspx page under the following scenario;

1) the "Cases Web View" public view in CRM is editted to include some new columns from the Case

2) the Contact does not have any cases in their view list, therefore the Case List Data Grid is not visible

3) a new Case is created by the Contact and CRM Workflow is used to populate some of the new columns which are displayed on the Cases Web View

The above scenario correctly creates a new Case in CRM, however becuase Workflow is used to generate some data, and update some attributes displayed through the Case Web View datagrid then these fields are initial empty and have no value. Once data is entered into the attributes, the Contact can see the Case Web View correctly.

The error occurs on "ViewCases.aspx.cs:line 66" which I assume is caused by the DataGrid Data Source being different from the DataGride Data Columns list.

Any ideas how to resolve?

Event code: 3005

Event message: An unhandled exception has occurred.

Event time: 27/05/2010 09:40:17

Event time (UTC): 27/05/2010 08:40:17

Event ID: 54c549e6c4a74b1e9289f4347f1fedd5

Event sequence: 102

Event occurrence: 9

Event detail code: 0

 

Application information:

Application domain: /LM/W3SVC/3/ROOT-1-129194194450617899

Trust level: Full

Application Virtual Path: /

Application Path: C:\inetpub\Allocate Software Web Portal\

Machine name: GAPDEV08APP2

 

Process information:

Process ID: 7612

Process name: w3wp.exe

Account name: NT AUTHORITY\NETWORK SERVICE

 

Exception information:

Exception type: HttpException

Exception message: A field or property with the name 'followupby' was not found on the selected data source.

 

Request information:

Request URL: http://allocatewebportal.gaplink.co.uk/Pages/eService/ViewCases.aspx?pageid=1d92f71d-6a3f-434d-a24c-c15597072c07

Request path: /Pages/eService/ViewCases.aspx

User host address: 10.0.16.36

User: 1e94f86f1bc1eae652b64bd173b205d6

Is authenticated: True

Authentication Type: Forms

Thread account name: NT AUTHORITY\NETWORK SERVICE

 

Thread information:

Thread ID: 21

Thread account name: NT AUTHORITY\NETWORK SERVICE

Is impersonating: False

Stack trace: at System.Web.UI.WebControls.BoundField.GetValue(Control controlContainer)

at System.Web.UI.WebControls.BoundField.OnDataBindField(Object sender, EventArgs e)

at System.Web.UI.Control.OnDataBinding(EventArgs e)

at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)

at System.Web.UI.Control.DataBind()

at System.Web.UI.Control.DataBindChildren()

at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)

at System.Web.UI.Control.DataBind()

at System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource)

at System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding)

at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)

at System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data)

at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)

at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)

at System.Web.UI.WebControls.DataBoundControl.PerformSelect()

at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()

at System.Web.UI.WebControls.GridView.DataBind()

at Site.Pages.eService.ViewCases.Page_Load(Object sender, EventArgs e) in C:\R5 Builds\Security Testing\Customer-Portal-R2\Website\Pages\eService\ViewCases.aspx.cs:line 66

at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)

at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)

at System.Web.UI.Control.OnLoad(EventArgs e)

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

 

Custom event details:

Jun 8, 2010 at 7:36 AM

Hi, has anyone been able to recreate this behaviour?  Do you think it's a defect and if so possible to resolve?

regards,

Mike.

Jun 8, 2010 at 2:16 PM

This is a side effect of how the gridview works combined with how the ToDataTable() method works.  You can always replace the code in the portal with a direct query that doesn't use the view lookup.  Just remember, the sample sites are sample sites and you are free to customize them for your own implementation.

Shan McArthur
www.shanmcarthur.net