Answered by:
Visual Studio 2010 Web Performance Test of CRM 2013 results in Error 500: Internal Server Error

Question
-
I am trying to create a Visual Studio 2010 Web Performance Test on a CRM 2013 web interface. Thought the recording seems to succeed, the test itself fails due to callls to AppGridWebService.ashx (see attached image).
The error is a http 500 error ('internal server error'). The Error details details show a null reference exception in Microsoft.Crm.Application.Controls.PageManager.getPathAndUri(UIPage page, String& path, CrmUri& uri). Full details are shown at the bottom.
I did find some information about another issue in CRM 2011, but the suggested solution does not seem to be applicable to my situation - I can't drill down to the source code, I don't see calls to Util.js and I don't have a Utils.js file at all in the solution. Can you please help me out on this?---------- Detailed error message -------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>500 - Internal server error.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#eeeeee;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#fff;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#fff;
background-color:#555555;}
#content{margin:0 0 0 2%;;}
.content-container{background:#fff;width:96%;margin-top:8px;padding:10px;;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>500 - Internal server error.</h2>
<h3>There is a problem with the resource you are looking for, and it cannot be displayed.</h3>
</fieldset></div>
</div>
</body>
</html>
<?xml version="1.0"?>
<error xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<exception>Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Xml.XmlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #19e3580bdetail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>System.Xml.XmlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #19e3580b</Message>
<Timestamp>2014-07-10T10:08:53.0850291Z</Timestamp>
<InnerFault>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>System.NullReferenceException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #a7aa6dd0</Message>
<Timestamp>2014-07-10T10:08:53.0850291Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</OrganizationServiceFault>
</exception>
<parameters xsi:nil="true" />
<displaytitle />
<displaytextencoded />
<displaytext />
<description>System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Crm.Application.Controls.PageManager.getPathAndUri(UIPage page, String& path, CrmUri& uri)
at Microsoft.Crm.Application.Controls.PageManager.IsFlatUIEnabled(UIPage page)
at Microsoft.Crm.Application.Controls.Grid.UI.LayoutProvider.RenderContextMenu(HtmlTextWriter output)
at Microsoft.Crm.Application.Controls.GridUIProvider.Render(HtmlTextWriter output)
at Microsoft.Crm.Core.Application.WebServices.AppGridWebServiceHandler.GetRefreshResponseHtml(IGridUIProvider uiProvider, StringBuilder sbTemp)
at Microsoft.Crm.Core.Application.WebServices.AppGridWebServiceHandler.Refresh(String gridXml, StringBuilder sbXml, StringBuilder sbHtml, Boolean returnJsonData)
at Microsoft.Crm.Core.Application.WebServices.AppGridWebServiceHandler.ProcessRequestInternal(HttpContext context)</description>
<file>Not available</file>
<line>Not available</line>
<details>Not available</details>
<traceInfo />
<requesturl>http://crm-dev.fgh.nl/FGHView/AppWebServices/AppGridWebServi…</requesturl>
<pathAndQuery>/FGHView/AppWebServices/AppGridWebService.ashx?operation=Refresh</pathAndQuery>
<source>ASHX_XML</source>
<stacktrace />
</error>Friday, July 11, 2014 9:49 AM
Answers
-
Hi Varsha,
It turns out that everything is fine when you use Visual Studio 2012. It generates a slightly different XML. Apart from that, be careful that you use the correct token. When you record a CRM 2013 web session, for many requests, a token is used and sent with the request. When you run a new session, a new token is used. But in your recorded test a different token is stored. You need to replace the token manually, or set a registrey key to ignore the token. See: http://social.msdn.microsoft.com/Forums/en-US/e9b193a6-7a93-4a45-9b6f-5f5e7dfbb7d0/invalidwrpctoken-error-when-running-a-web-performance-test-crm-2011-ifd?forum=vstswebtest.
HTH. Regards,
- Marked as answer by A. Tolmeijer Friday, August 29, 2014 7:20 AM
Friday, August 29, 2014 7:19 AM
All replies
-
hi
I am facing similar issue as you had mentioned. are you able toresolve the same
thanks
Varsha
Thursday, August 28, 2014 1:54 PM -
Hi Varsha,
It turns out that everything is fine when you use Visual Studio 2012. It generates a slightly different XML. Apart from that, be careful that you use the correct token. When you record a CRM 2013 web session, for many requests, a token is used and sent with the request. When you run a new session, a new token is used. But in your recorded test a different token is stored. You need to replace the token manually, or set a registrey key to ignore the token. See: http://social.msdn.microsoft.com/Forums/en-US/e9b193a6-7a93-4a45-9b6f-5f5e7dfbb7d0/invalidwrpctoken-error-when-running-a-web-performance-test-crm-2011-ifd?forum=vstswebtest.
HTH. Regards,
- Marked as answer by A. Tolmeijer Friday, August 29, 2014 7:20 AM
Friday, August 29, 2014 7:19 AM