An unhandled exception occurred during the execution of the current web request

This question is not answered

Hi all,

 Am a little stuck at the moment.  Are getting the below error.  Current environment is CRM application (X86), SQL Server 2005, SQL Reporting Server 2005. The application server is on VMWare, the rest are physical servers.

 Tenants were working ok on Friday and have some strange reason started throwing this error when connecting to the url for all of the tenants.  The only thing that has changed was a update to the VMware tools on the server.  I am currently having the VM restored but would like to investigate why this has occurred as this is a Dev server and intend in the future to upgrade the VMWare tools in production.  The CRM URL error is the error I get when connecting via a web page.

 The event log errors are at the bottom.

CRM URL Error 

Error 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.


Error Details:

Exception of type 'System.Web.HttpUnhandledException' was thrown.


Full Stack:

[InvalidOperationException: ExecuteNonQuery requires the command to have a transaction when the connection assigned to the command is in a pending local transaction.  The Transaction property of the command has not been initialized.]
   at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command)
   at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate)
   at Microsoft.Crm.CrmDbConnection.SetTransactionIsolationLevel(IsolationLevel il)
   at Microsoft.Crm.CrmDbConnection.Close()
   at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadDatSetFromDatabase(LoadMasks masks, CrmDbConnection connection, CrmTransaction transaction, Guid organizationId)
   at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadCacheFromDatabaseInternal(LoadMasks masks, CrmDbConnection connection, CrmTransaction transaction, Guid organizationId)
   at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadCacheFromDatabase(LoadMasks masks, IOrganizationContext context)
   at Microsoft.Crm.Metadata.DynamicMetadataCacheFactory.LoadMetadataCache(LoadMethod method, CacheType type, IOrganizationContext context)
   at Microsoft.Crm.Metadata.MetadataCache.LoadCache(IOrganizationContext context)
   at Microsoft.Crm.Metadata.MetadataCache.GetInstance(IOrganizationContext context)
   at Microsoft.Crm.BusinessEntities.BusinessEntityMoniker..ctor(Guid id, String entityName, Guid organizationId)
   at Microsoft.Crm.Caching.OrganizationSettingsCacheLoader.LoadCacheData(Guid key, ExecutionContext context)
   at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)
   at Microsoft.Crm.Caching.BasicCrmCache`2.CreateEntry(TKey key, IOrganizationContext context)
   at Microsoft.Crm.Caching.BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context)
   at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetOrganizationSystemUser(Guid org, IOrganizationContext context)
   at Microsoft.Crm.BusinessEntities.SystemUserContext..ctor(ExecutionContext context, Boolean switchAuditingInfo)
   at Microsoft.Crm.Extensibility.V3CalloutImporter.Import()
   at Microsoft.Crm.WebServices.CrmAuthenticationSoapExtensionBase..cctor()

[TypeInitializationException: The type initializer for 'Microsoft.Crm.WebServices.CrmAuthenticationSoapExtensionBase' threw an exception.]
   at Microsoft.Crm.WebServices.CrmAuthenticationSoapExtensionBase.RequestTypeNameToMethodName(String requestTypeName)
   at Microsoft.Crm.Sdk.InProcessCrmService.CreateSoapContext(Object request)
   at Microsoft.Crm.Sdk.InProcessCrmService.Execute(Object request)
   at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.ExecuteInternal()
   at Microsoft.Crm.Application.Platform.ServiceCommands.RetrieveCommand.Execute()
   at Microsoft.Crm.Application.Platform.DataSource.Retrieve(String entityName, Guid entityId, String[] columns)
   at Microsoft.Crm.Application.MasterSiteMap.LoadMasterSiteMapInternal(Guid organizationId, DynamicMetadataCache metadataCache, Boolean useReferenceXml)
   at Microsoft.Crm.Application.MasterSiteMap.LoadMasterSiteMap(Guid organizationId, DynamicMetadataCache metadataCache)
   at Microsoft.Crm.Caching.MasterSiteMapCacheLoader.LoadCacheData(MasterSiteMapCacheKey key, IOrganizationContext context)
   at Microsoft.Crm.Caching.BasicCrmCache`2.CreateEntry(TKey key, IOrganizationContext context)
   at Microsoft.Crm.Caching.BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context)
   at Microsoft.Crm.Application.SiteMap.GetSiteMapForUser(IUser user, Client client, Boolean isOffline, String forceGroupProfiles)
   at Microsoft.Crm.Caching.UserSiteMapCacheLoader.LoadCacheData(UserSiteMapCacheKey key, IOrganizationContext context)
   at Microsoft.Crm.Caching.BasicCrmCache`2.CreateEntry(TKey key, IOrganizationContext context)
   at Microsoft.Crm.Caching.BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context)
   at Microsoft.Crm.Caching.UserSiteMapCache.LookupEntry(Guid userId, IOrganizationContext context)
   at Microsoft.Crm.Web.Loader.ConfigurePage()
   at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
   at Microsoft.Crm.Web.Loader.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

[HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.]
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.studentsupport_loader_aspx.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Other Message:


Error Number:


Source File:

Not available


Line Number:

Not available
 
EVENT LOG ERRORS
 
Event Type: Error
Event Source: MSCRMAsyncService
Event Category: None
Event ID: 17415
Date:  5/01/2010
Time:  8:51:09 AM
User:  N/A
Computer: CRMDEVAS01
Description:
Host CRMDEVAS01: error while processing organization f3b41815-6ebc-453c-af1d-3216786bf0bd. Exception: System.Data.SqlClient.SqlException: The SELECT permission was denied on the object 'AsyncOperationBase', database 'CRMDEV_MSCRM', schema 'dbo'.
The UPDATE permission was denied on the object 'AsyncOperationBase', database 'CRMDEV_MSCRM', schema 'dbo'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command)
   at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate)
   at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command)
   at Microsoft.Crm.Asynchronous.DataAccessSharedBase.ExecuteSqlCommand(IDbCommand command, Nullable`1 expectedAffectedRecords)
   at Microsoft.Crm.Asynchronous.QueueDataAccess.KeepAlive()
   at Microsoft.Crm.Asynchronous.QueueManager.<OnKeepAliveTimerEvent>b__3(IQueueDataAccess queueDataAccess)
   at Microsoft.Crm.Asynchronous.QueueManager.ExecuteForAllOrganizations(OrganizationQueueDataAccessHandler handler)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
****************************************************************
Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date:  5/01/2010
Time:  8:50:49 AM
User:  N/A
Computer: CRMDEVAS01
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 5/01/2010 8:50:49 AM
Event time (UTC): 4/01/2010 9:50:49 PM
Event ID: e856f707b4654e15874206ff741ed8c5
Event sequence: 2365
Event occurrence: 8
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1/ROOT-1-129070623098731803
    Trust level: Full
    Application Virtual Path: /
    Application Path: c:\inetpub\wwwroot\
    Machine name: CRMDEVAS01
 
Process information:
    Process ID: 4056
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE
 
Exception information:
    Exception type: TypeInitializationException
    Exception message: The type initializer for 'Microsoft.Crm.WebServices.CrmAuthenticationSoapExtensionBase' threw an exception.
 
Request information:
    Request URL: http://crmdevas01.education.vic.gov.au/StudentSupport/loader.aspx
    Request path: /StudentSupport/loader.aspx
    User host address: 10.10.11.93
    User: EDU001\a08816191
    Is authenticated: True
    Authentication Type: Negotiate
    Thread account name: NT AUTHORITY\NETWORK SERVICE
 
Thread information:
    Thread ID: 3
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False
    Stack trace:    at Microsoft.Crm.WebServices.CrmAuthenticationSoapExtensionBase.RequestTypeNameToMethodName(String requestTypeName)
   at Microsoft.Crm.Sdk.InProcessCrmService.CreateSoapContext(Object request)
   at Microsoft.Crm.Sdk.InProcessCrmService.Execute(Object request)
   at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.ExecuteInternal()
   at Microsoft.Crm.Application.Platform.ServiceCommands.RetrieveMultipleCommand.Execute()
   at Microsoft.Crm.Application.Caching.CustomResourceLoader.GetCustomResources(Guid organizationId, CustomResourceCacheKey cacheKey, String lastModifiedOn)
   at Microsoft.Crm.Application.Caching.CustomResourceLoader.GetCustomResources(Guid organizationId, CustomResourceCacheKey cacheKey)
   at Microsoft.Crm.Application.Caching.CustomResourceLoader.LoadCacheData(CustomResourceCacheKey key, IOrganizationContext context)
   at Microsoft.Crm.Caching.CrmMultiOrgCache`2.CreateEntry(TKey key, IOrganizationContext context)
   at Microsoft.Crm.Caching.CrmMultiOrgCache`2.LookupEntry(TKey key, IOrganizationContext context)
   at Microsoft.Crm.Application.Caching.CustomResourceCache.LookupEntry(CultureInfo culture)
   at Microsoft.Crm.Application.ResourceManager.CustomResourceManager.TryGetCustomString(String name, CultureInfo culture)
 
 
Custom event details:
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
 
All Replies
  • Hi Angus,

    The SELECT permission was denied on the object 'AsyncOperationBase', database 'CRMDEV_MSCRM', schema 'dbo'.
    The UPDATE permission was denied on the object 'AsyncOperationBase', database 'CRMDEV_MSCRM', schema 'dbo'.

    The above error message seem to indicate a permissions issue.  My guess someone or something changed the permmissions in your crmdev database OR the crm active directory groups.

    Alex Fagundes - www.PowerObjects.com
    Global Search for CRM 2011 - Click Here

  • Thanks Alex, unfortuantly it did not work.

     Will probably just look at a rebuild on this.