This project is read-only.
2
Vote

Problems with stability of the notification accelerator (RSS)

description

This accelerator does not appear to be stable. On a regular basis it just stops working. The user gets an error message when trying to create a new subscription.
In the eventviewer the message below is displayed.
 
 
2/11/2010 10:10:59 AM rssdata q=%7b00000000-0000-0000-00AA-000010003000%7d
2/11/2010 10:10:59 AM The type initializer for 'MSA_RSS.CrmMetadataCache' threw an exception
 
a other issue was that it did not function correctly for a multiinstance environment
see below;
The function getOrgName in the class sqlhelper gives a wrong default OrganisationName in case of a multi instance environment, the instances are provided in alphabetic order and not the order they were installed.
 
   private string getOrgName(Uri oUri)
    {
        // check appended org
        string sAppended = oUri.Segments[1].Replace("/","");
 
        // check prepended org
        string[] sHost = oUri.Host.Split('.');
        string sPrepended = sHost[0];
 
        CrmDiscoveryService.CrmDiscoveryService oDiscoveryService = new CrmDiscoveryService.CrmDiscoveryService();
        oDiscoveryService.UseDefaultCredentials = true;
 
        RetrieveOrganizationsRequest orgRequest = new RetrieveOrganizationsRequest();
        RetrieveOrganizationsResponse orgResponse = (RetrieveOrganizationsResponse)oDiscoveryService.Execute(orgRequest);
        string sOrgName = null;
        foreach (OrganizationDetail orgDetail in orgResponse.OrganizationDetails)
        {
            if (string.IsNullOrEmpty(sOrgName))
            {
                // save the first returned org (since we cannot tell which is the default)
                sOrgName = orgDetail.OrganizationName;
                sOrgFriendlyName = orgDetail.FriendlyName;
            }
            if (sAppended == orgDetail.OrganizationName)
            {
                //  the org name is appended (like a virtual directory)
                sOrgName = sAppended;
                sOrgFriendlyName = orgDetail.FriendlyName;
            }
            else if (sPrepended == orgDetail.OrganizationName)
            {
                // the org name is pre-pended (IFD)
                sOrgName = sPrepended;
                sOrgFriendlyName = orgDetail.FriendlyName;
            }
        }
        return sOrgName;
    }
}
 
 
We do understand its difficult to work with just the message from the eventviewer. But this is indeed all we have as well and have been trying in several iteration, over month, to get it stable.
 
If you require additional information or have any questions please contact me, so i can connect you with the developer working on this problem.
 
Regards,
 
Andre Wiersma (andrew@cayentis.com)

comments

cbrooks wrote May 12, 2010 at 7:40 PM

I see this error consistently in my environment. It appears to be permissions related.

After an IISRESET, If I first access a feed from an administrator account, things seem to work fine for all users after that. If I try from a non-administrator first, I get the error then and from then on for all user types.

cbrooks wrote May 12, 2010 at 7:59 PM

ok - here is an update on this.

The type initializer of CrmMetadataCache is calling RetrieveAllEntities on startup.

If I give the "first" user read permissions on entities, attributes and relationships (as required by the RetrieveAllEntities message - http://msdn.microsoft.com/en-us/library/cc156305.aspx), everything works properly.

Seems like a bug. Regular users shouldn't need this permission. Should the metadata call use a different user account for access?

wrote May 12, 2010 at 8:57 PM

Mbur5099 wrote Mar 1, 2011 at 9:01 PM

I was experiencing these errors in tandem with
Warning: ASP.NET 2.0.50727.0
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 3/1/2011 12:22:46 PM
Event time (UTC): 3/1/2011 8:22:46 PM
Event ID: 2aff2a00ad664c0cb08e573c3e8b1469
Event sequence: 21376
Event occurrence: 278
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/ROOT-1-129434069602104531 
Trust level: Full 
Application Virtual Path: / 
Application Path: c:\inetpub\wwwroot\ 
Machine name: Ourerrorthrowingserver 
Process information:
Process ID: 4252 
Process name: w3wp.exe 
Account name: NT AUTHORITY\NETWORK SERVICE 
Exception information:
Exception type: Exception 
Exception message: Error in RSS Application: The type initializer for 'MSA_RSS.CrmMetadataCache' threw an exception. 
After restarting the IIS service on that machine, so far both the errors and warnings have been resolved.

wrote Feb 22, 2013 at 12:10 AM