Forums

Forums / Bugs & Issues / Portal Registration widget encounters SecurityException upon registering user

Portal Registration widget encounters SecurityException upon registering user

2 posts, 0 answered
  1. Ray Arambula
    Ray Arambula avatar
    2 posts
    Registered:
    22 Mar 2018
    29 Nov 2018
    Link to this post
    I have create a page in sitefinity containing the Portal Registration widget.  When I attempt to create a new user, it successfully creates the contact in CRM but then encounters an error.  The error is encountered whether I am creating a new user or registering one for which there is already a Contact record in the CRM database.  Every time I encounter the error, the below log is generated under Portal Connector Configuration.  I have verified that the TPC connection to CRM works and am at a loss for what else to check.  Thanks!

    System.Security.SecurityException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #9EFFD797
    ---------------------------------------------
    Server stack trace: at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at Microsoft.Xrm.Tooling.Connector.CrmServiceClient.Create(Entity entity) at pavliks.PortalConnector.Crm.Connection.CrmDirectConnection.Do[TResult](Func`1 func) at pavliks.PortalConnector.Mvc.Pages.Mvc.Models.TpcRegistration.RegistrationModel.CreatePortalUser(ICrmConnection connection, RegistrationViewModel userData, Guid contactId, Boolean& existingPortalUser) in D:\Working\Source\FeatureBranches\MultiSite\pavliks.PortalConnector.Mvc.Pages\Mvc\Models\TpcRegistration\RegistrationModel.cs:line 691 at pavliks.PortalConnector.Mvc.Pages.Mvc.Models.TpcRegistration.RegistrationModel.TryCreateUser(UserManager manager, RegistrationViewModel userData, PortalUser& portalUserInfo, PortalMembershipCreateStatus& status) in D:\Working\Source\FeatureBranches\MultiSite\pavliks.PortalConnector.Mvc.Pages\Mvc\Models\TpcRegistration\RegistrationModel.cs:line 609
    ---------------------------------------------
    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at pavliks.PortalConnector.ExceptionManager.CreateErrorString(Exception ex) at pavliks.PortalConnector.ExceptionManager.HandleError(String title, Exception ex, ErrorVerbosity verbosity, String& urlName) at pavliks.PortalConnector.ExceptionManager.HandleError(String title, Exception ex, ErrorVerbosity verbosity) at pavliks.PortalConnector.Mvc.Pages.Mvc.Models.TpcRegistration.RegistrationModel.TryCreateUser(UserManager manager, RegistrationViewModel userData, PortalUser& portalUserInfo, PortalMembershipCreateStatus& status) in D:\Working\Source\FeatureBranches\MultiSite\pavliks.PortalConnector.Mvc.Pages\Mvc\Models\TpcRegistration\RegistrationModel.cs:line 609 at pavliks.PortalConnector.Mvc.Pages.Mvc.Models.TpcRegistration.RegistrationModel.RegisterUser(RegistrationViewModel viewModel, PortalUser& portalUser) in D:\Working\Source\FeatureBranches\MultiSite\pavliks.PortalConnector.Mvc.Pages\Mvc\Models\TpcRegistration\RegistrationModel.cs:line 299 at pavliks.PortalConnector.Mvc.Pages.Mvc.Controllers.TpcRegistrationController.Index(RegistrationViewModel viewModel) in D:\Working\Source\FeatureBranches\MultiSite\pavliks.PortalConnector.Mvc.Pages\Mvc\Controllers\TpcRegistrationController.cs:line 100 at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.
  2. Ray Arambula
    Ray Arambula avatar
    2 posts
    Registered:
    22 Mar 2018
    29 Nov 2018
    Link to this post
    I have some additional information on this issue.  I found a separate way to cause the SecurityException to be thrown.  If I navigate into the CRM and go to Settings -> Portals and select my portal, and in this form attempt to create a new portal user, I again get the SecurityException.  Here I am able to download a log and get the following that makes it look like the PrePortalUserCreate plugin is encountering an issue:

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Security.SecurityException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #AFF36CE7Detail: 
    <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
      <ActivityId>bcdcf1f7-5192-4b2e-99cf-f013880b75f9</ActivityId>
      <ErrorCode>-2147220970</ErrorCode>
      <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
      <Message>System.Security.SecurityException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #AFF36CE7</Message>
      <Timestamp>2018-11-29T20:57:48.5361923Z</Timestamp>
      <ExceptionRetriable>false</ExceptionRetriable>
      <ExceptionSource i:nil="true" />
      <InnerFault i:nil="true" />
      <OriginalException i:nil="true" />
      <TraceText>

    [pavliks.PortalConnector.Plugins: pavliks.PortalConnector.Plugins.PrePortalUserCreate]
    [21117361-c97b-e811-97f2-00155dc80f25: pavliks.PortalConnector.Plugins.PrePortalUserCreate: Create of pav_portaluser]


    </TraceText>
    </OrganizationServiceFault>
2 posts, 0 answered