Hello experts,
I created a customer self-service trial portal to test out Microsoft Portal technology,
and there is an error message when I try to submit a case on Portal to Dataverse.
I tried every possible solution, case creation just works fine in Dynamics 365, only broken on Portal.
Here is the error I got:
Server Error in '/' Application.
Sequence contains no elements
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Sequence contains no elements
Exception stack trace:
[InvalidOperationException: Sequence contains no elements] Microsoft.Xrm.Sdk.Linq.QueryProvider.ThrowException(Exception exception) +12 Microsoft.Xrm.Sdk.Linq.QueryProvider.Execute(QueryExpression qe, Boolean throwIfSequenceIsEmpty, Boolean throwIfSequenceNotSingle, Projection projection, NavigationSource source, List`1 linkLookups, String& pagingCookie, Boolean& moreRecords) +870 Microsoft.Xrm.Sdk.Linq.QueryProvider.Execute(QueryExpression qe, Boolean throwIfSequenceIsEmpty, Boolean throwIfSequenceNotSingle, Projection projection, NavigationSource source, List`1 linkLookups) +121 Microsoft.Xrm.Sdk.Linq.QueryProvider.Execute(Expression expression) +277 Microsoft.Xrm.Sdk.Linq.QueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) +72 Adxstudio.Xrm.Web.UI.CrmEntityFormView.SharePointDocumentsControlTemplate.BuildSharePointGrid(Object id) in S:\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\SharePointDocumentsControlTemplate.cs:267 Adxstudio.Xrm.Web.UI.CrmEntityFormView.SharePointDocumentsControlTemplate.InstantiateControlIn(HtmlControl container) in S:\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\SharePointDocumentsControlTemplate.cs:86 Adxstudio.Xrm.Web.UI.CrmEntityFormView.TableLayoutRowTemplate.InstantiateLayoutIn(Control container, IEnumerable`1 cellTemplates) in S:\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\TableLayoutRowTemplate.cs:65 Adxstudio.Xrm.Web.UI.CrmEntityFormView.TableLayoutRowTemplate.InstantiateIn(Control container) in S:\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\TableLayoutRowTemplate.cs:53 Adxstudio.Xrm.Web.UI.CrmEntityFormView.TableLayoutSectionTemplate.InstantiateIn(Control container) in S:\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\TableLayoutSectionTemplate.cs:141 Adxstudio.Xrm.Web.UI.CrmEntityFormView.TabTemplate.InstantiateIn(Control container) in S:\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\TabTemplate.cs:122 Adxstudio.Xrm.Web.UI.CrmEntityFormView.CompositeTemplate.InstantiateIn(Control container) in S:\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\CompositeTemplate.cs:19 Adxstudio.Xrm.Web.UI.WebControls.CrmEntityFormView.CreateChildControls() in S:\Framework\Adxstudio.Xrm\Web\UI\WebControls\CrmEntityFormView.cs:842 System.Web.UI.Control.EnsureChildControls() +107 System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +47 System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +330 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1688
I I enabled diagnostic logging, but when I reproduce this problem, the same exception appears in blob but nothing really useful.
Here I attach the relevant diagnostic message:
2021-06-25T12:30:13,Error,site-***************36,"RequestData:, RequestPath:/support/create-case/, RequestExtension:, SessionId:3sf4ayljj0ezpv5swdow1lf0, UserId:*************, CorrelationId:3d844ab0-99e7-4b70-90f6-35ef853ab482, Elapsed:5427.5293, RequestMethod:GET, RequestContentType:, RequestAccept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8, RequestCacheControl:, UserAgent:Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0, HandlerName:ASP.pages_webtemplate_aspx, HandlerExecuted:False, VaryByCustom:user;website;language, MemberName:OnLoad, SourceFilePath:S:\Framework\Adxstudio.Xrm\Web\UI\WebControls\LiquidServerControl.cs, SourceLineNumber:305, ExceptionMessage:Sequence contains no elements
System.InvalidOperationException
at Microsoft.Xrm.Sdk.Linq.QueryProvider.ThrowException(Exception exception)
at Microsoft.Xrm.Sdk.Linq.QueryProvider.Execute(QueryExpression qe, Boolean throwIfSequenceIsEmpty, Boolean throwIfSequenceNotSingle, Projection projection, NavigationSource source, List`1 linkLookups, String& pagingCookie, Boolean& moreRecords)
at Microsoft.Xrm.Sdk.Linq.QueryProvider.Execute[TElement](QueryExpression qe, Boolean throwIfSequenceIsEmpty, Boolean throwIfSequenceNotSingle, Projection projection, NavigationSource source, List`1 linkLookups)
at Microsoft.Xrm.Sdk.Linq.QueryProvider.Execute[TElement](Expression expression)
at Microsoft.Xrm.Sdk.Linq.QueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
at Adxstudio.Xrm.Web.UI.CrmEntityFormView.SharePointDocumentsControlTemplate.BuildSharePointGrid(Object id) in S:\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\SharePointDocumentsControlTemplate.cs:line 267
at Adxstudio.Xrm.Web.UI.CrmEntityFormView.SharePointDocumentsControlTemplate.<>c__DisplayClass17_0.<InstantiateControlIn>b__1(Object obj) in S:\Framework\Adxstudio.Xrm\Web\UI\CrmEntityFormView\SharePointDocumentsControlTemplate.cs:line 79
at Adxstudio.Xrm.Web.UI.WebControls.CrmEntityFormView.PerformDataBinding(IEnumerable data) in S:\Framework\Adxstudio.Xrm\Web\UI\WebControls\CrmEntityFormView.cs:line 1350
at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at Adxstudio.Xrm.Web.UI.WebControls.LiquidServerControl.OnLoad(EventArgs args) in S:\Framework\Adxstudio.Xrm\Web\UI\WebControls\LiquidServerControl.cs:line 299
Microsoft.Xrm.Sdk
, EventData:, Category:Application, ErrorCategory:ApplicationError",80018897-0000-ef00-b63f-84710c7967bb
Someone had seen this error before?