UmbracoCms ends up with error: This SqlTransaction has completed; it is no longer usable - umbraco

I've installed UmbracoCms 8.5.3 (and tried some older versions as well) package on an Empty ASP.NET Web Application (.NET Framework 4.7.2) in VS 2019 v. 16.4.5. I can install it completely when default SQL CE is selected on installation process. But if I try to install it with SQL Server or Custom connection string database type it ends up with error
This SqlTransaction has completed; it is no longer usable.
I've searched on Umbraco forum and found some similar situations but non of their solutions worked for me (e.g. My SQL connection timeout is 0 (unlimited), I've set db_datareader, db_datawriter, db_owner on my database login). I have Orchard core installed in the same VS and SQL instances without any issues.
I've installed both SQL Server 2017 Enterprise and Express (installed it later when I thought it's mandatory to use Express edition!) versions on my machine.
Here is the error part of my log file:
{
"#t": "2020-02-21T10:23:29.1456963Z",
"#mt": "Exception ({InstanceId}).",
"#l": "Error",
"#x": "System.Data.SqlClient.SqlException (0x80131904): Foreign key 'FK_umbracoContent_cmsContentType_NodeId' references invalid column 'NodeId' in referenced table 'cmsContentType'.\r\nCould not create constraint or index. See previous errors.\r\n at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)\r\n at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)\r\n at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)\r\n at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)\r\n at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()\r\n at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteNonQuery() in C:\\projects\\dotnet\\src\\MiniProfiler.Shared\\Data\\ProfiledDbCommand.cs:line 272\r\n at Umbraco.Core.Persistence.FaultHandling.FaultHandlingDbCommand.<ExecuteNonQuery>b__31_0() in d:\\a\\1\\s\\src\\Umbraco.Core\\Persistence\\FaultHandling\\RetryDbConnection.cs:line 209\r\n at Umbraco.Core.Persistence.FaultHandling.FaultHandlingDbCommand.<>c__DisplayClass33_0`1.<Execute>b__0() in d:\\a\\1\\s\\src\\Umbraco.Core\\Persistence\\FaultHandling\\RetryDbConnection.cs:line 222\r\n at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func) in d:\\a\\1\\s\\src\\Umbraco.Core\\Persistence\\FaultHandling\\RetryPolicy.cs:line 172\r\n at Umbraco.Core.Persistence.FaultHandling.FaultHandlingDbCommand.Execute[T](Func`1 f) in d:\\a\\1\\s\\src\\Umbraco.Core\\Persistence\\FaultHandling\\RetryDbConnection.cs:line 219\r\n at Umbraco.Core.Persistence.FaultHandling.FaultHandlingDbCommand.ExecuteNonQuery() in d:\\a\\1\\s\\src\\Umbraco.Core\\Persistence\\FaultHandling\\RetryDbConnection.cs:line 209\r\n at NPoco.Database.ExecuteNonQueryHelper(DbCommand cmd)\r\n at NPoco.Database.NPoco.IDatabaseHelpers.ExecuteNonQueryHelper(DbCommand cmd)\r\n at NPoco.Database.Execute(String sql, CommandType commandType, Object[] args)\r\n at NPoco.Database.Execute(Sql Sql)\r\n at Umbraco.Core.Migrations.Install.DatabaseSchemaCreator.CreateTable(Boolean overwrite, Type modelType, DatabaseDataCreator dataCreation) in d:\\a\\1\\s\\src\\Umbraco.Core\\Migrations\\Install\\DatabaseSchemaCreator.cs:line 479\r\n at Umbraco.Core.Migrations.Install.DatabaseSchemaCreator.InitializeDatabaseSchema() in d:\\a\\1\\s\\src\\Umbraco.Core\\Migrations\\Install\\DatabaseSchemaCreator.cs:line 130\r\n at Umbraco.Core.Migrations.Install.DatabaseBuilder.CreateSchemaAndData(IScope scope) in d:\\a\\1\\s\\src\\Umbraco.Core\\Migrations\\Install\\DatabaseBuilder.cs:line 450\r\nClientConnectionId:370d6141-511f-4a7f-894c-e722759915c4\r\nError Number:1770,State:0,Class:16",
"InstanceId": "6e5d38c7",
"SourceContext": "Umbraco.Core.Persistence.UmbracoDatabase",
"ProcessId": 13248,
"ProcessName": "iisexpress",
"ThreadId": 16,
"AppDomainId": 4,
"AppDomainAppId": "LMW3SVC3ROOT",
"MachineName": "My_Machine_Name",
"Log4NetLevel": "ERROR",
"HttpRequestNumber": 4,
"HttpRequestId": "e67f1e83-0f7b-4a05-bc43-eb401576fab9"
} {
"#t": "2020-02-21T10:23:29.1456963Z",
"#mt": "Database configuration failed",
"#l": "Error",
"#x": "System.Data.SqlClient.SqlException (0x80131904): Foreign key 'FK_umbracoContent_cmsContentType_NodeId' references invalid column 'NodeId' in referenced table 'cmsContentType'.\r\nCould not create constraint or index. See previous errors.\r\n at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)\r\n at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)\r\n at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)\r\n at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)\r\n at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()\r\n at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteNonQuery() in C:\\projects\\dotnet\\src\\MiniProfiler.Shared\\Data\\ProfiledDbCommand.cs:line 272\r\n at Umbraco.Core.Persistence.FaultHandling.FaultHandlingDbCommand.<ExecuteNonQuery>b__31_0() in d:\\a\\1\\s\\src\\Umbraco.Core\\Persistence\\FaultHandling\\RetryDbConnection.cs:line 209\r\n at Umbraco.Core.Persistence.FaultHandling.FaultHandlingDbCommand.<>c__DisplayClass33_0`1.<Execute>b__0() in d:\\a\\1\\s\\src\\Umbraco.Core\\Persistence\\FaultHandling\\RetryDbConnection.cs:line 222\r\n at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func) in d:\\a\\1\\s\\src\\Umbraco.Core\\Persistence\\FaultHandling\\RetryPolicy.cs:line 172\r\n at Umbraco.Core.Persistence.FaultHandling.FaultHandlingDbCommand.Execute[T](Func`1 f) in d:\\a\\1\\s\\src\\Umbraco.Core\\Persistence\\FaultHandling\\RetryDbConnection.cs:line 219\r\n at Umbraco.Core.Persistence.FaultHandling.FaultHandlingDbCommand.ExecuteNonQuery() in d:\\a\\1\\s\\src\\Umbraco.Core\\Persistence\\FaultHandling\\RetryDbConnection.cs:line 209\r\n at NPoco.Database.ExecuteNonQueryHelper(DbCommand cmd)\r\n at NPoco.Database.NPoco.IDatabaseHelpers.ExecuteNonQueryHelper(DbCommand cmd)\r\n at NPoco.Database.Execute(String sql, CommandType commandType, Object[] args)\r\n at NPoco.Database.Execute(Sql Sql)\r\n at Umbraco.Core.Migrations.Install.DatabaseSchemaCreator.CreateTable(Boolean overwrite, Type modelType, DatabaseDataCreator dataCreation) in d:\\a\\1\\s\\src\\Umbraco.Core\\Migrations\\Install\\DatabaseSchemaCreator.cs:line 479\r\n at Umbraco.Core.Migrations.Install.DatabaseSchemaCreator.InitializeDatabaseSchema() in d:\\a\\1\\s\\src\\Umbraco.Core\\Migrations\\Install\\DatabaseSchemaCreator.cs:line 130\r\n at Umbraco.Core.Migrations.Install.DatabaseBuilder.CreateSchemaAndData(IScope scope) in d:\\a\\1\\s\\src\\Umbraco.Core\\Migrations\\Install\\DatabaseBuilder.cs:line 450\r\nClientConnectionId:370d6141-511f-4a7f-894c-e722759915c4\r\nError Number:1770,State:0,Class:16",
"SourceContext": "Umbraco.Core.Migrations.Install.DatabaseBuilder",
"ProcessId": 13248,
"ProcessName": "iisexpress",
"ThreadId": 16,
"AppDomainId": 4,
"AppDomainAppId": "LMW3SVC3ROOT",
"MachineName": "My_Machine_Name",
"Log4NetLevel": "ERROR",
"HttpRequestNumber": 4,
"HttpRequestId": "e67f1e83-0f7b-4a05-bc43-eb401576fab9"
} {
"#t": "2020-02-21T10:23:29.1466970Z",
"#mt": "The database schema validation produced the following summary: {DbSchemaSummary}",
"DbSchemaSummary": "The following tables were found in the database, but are not in the current schema:\r\numbracoUser,umbracoNode,cmsContentType,cmsTemplate,umbracoContent,umbracoContentVersion,umbracoMediaVersion,umbracoDocument,cmsDocumentType,umbracoDataType,cmsDictionary,umbracoLanguage,cmsLanguageText,umbracoDomain,umbracoLog,cmsMacro,cmsMacroProperty,cmsMemberType,cmsMember,cmsMember2MemberGroup,cmsPropertyTypeGroup,cmsPropertyType,umbracoPropertyData,umbracoRelationType,umbracoRelation,cmsTags,cmsTagRelationship,cmsContentType2ContentType,cmsContentTypeAllowedContentType,umbracoUser2NodeNotify,umbracoServer,umbracoAccess,umbracoAccessRule,umbracoCacheInstruction,umbracoExternalLogin,umbracoRedirectUrl,umbracoLock,umbracoUserGroup,umbracoUser2UserGroup,umbracoUserGroup2NodePermission,umbracoUserGroup2App,umbracoUserStartNode,cmsContentNu,umbracoDocumentVersion,umbracoKeyValue,umbracoUserLogin,umbracoConsent,umbracoAudit,umbracoContentVersionCultureVariation,umbracoDocumentCultureVariation,umbracoContentSchedule\r\n \r\nThe following columns were found in the database, but are not in the current schema:\r\numbracoUser,id,umbracoUser,userDisabled,umbracoUser,userNoConsole,umbracoUser,userName,umbracoUser,userLogin,umbracoUser,userPassword,umbracoUser,passwordConfig,umbracoUser,userEmail,umbracoUser,userLanguage,umbracoUser,securityStampToken,umbracoUser,failedLoginAttempts,umbracoUser,lastLockoutDate,umbracoUser,lastPasswordChangeDate,umbracoUser,lastLoginDate,umbracoUser,emailConfirmedDate,umbracoUser,invitedDate,umbracoUser,createDate,umbracoUser,updateDate,umbracoUser,avatar,umbracoUser,tourData,umbracoNode,id,umbracoNode,uniqueId,umbracoNode,parentId,umbracoNode,level,umbracoNode,path,umbracoNode,sortOrder,umbracoNode,trashed,umbracoNode,nodeUser,umbracoNode,text,umbracoNode,nodeObjectType,umbracoNode,createDate,cmsContentType,pk,cmsContentType,nodeId,cmsContentType,alias,cmsContentType,icon,cmsContentType,thumbnail,cmsContentType,description,cmsContentType,isContainer,cmsContentType,isElement,cmsContentType,allowAtRoot,cmsContentType,variations,cmsTemplate,pk,cmsTemplate,nodeId,cmsTemplate,alias,umbracoContent,nodeId,umbracoContent,contentTypeId,umbracoContentVersion,id,umbracoContentVersion,nodeId,umbracoContentVersion,versionDate,umbracoContentVersion,userId,umbracoContentVersion,current,umbracoContentVersion,text,umbracoMediaVersion,id,umbracoMediaVersion,path,umbracoDocument,nodeId,umbracoDocument,published,umbracoDocument,edited,cmsDocumentType,contentTypeNodeId,cmsDocumentType,templateNodeId,cmsDocumentType,IsDefault,umbracoDataType,nodeId,umbracoDataType,propertyEditorAlias,umbracoDataType,dbType,umbracoDataType,config,cmsDictionary,pk,cmsDictionary,id,cmsDictionary,parent,cmsDictionary,key,umbracoLanguage,id,umbracoLanguage,languageISOCode,umbracoLanguage,languageCultureName,umbracoLanguage,isDefaultVariantLang,umbracoLanguage,mandatory,umbracoLanguage,fallbackLanguageId,cmsLanguageText,pk,cmsLanguageText,languageId,cmsLanguageText,UniqueId,cmsLanguageText,value,umbracoDomain,id,umbracoDomain,domainDefaultLanguage,umbracoDomain,domainRootStructureID,umbracoDomain,domainName,umbracoLog,id,umbracoLog,userId,umbracoLog,NodeId,umbracoLog,entityType,umbracoLog,Datestamp,umbracoLog,logHeader,umbracoLog,logComment,umbracoLog,parameters,cmsMacro,id,cmsMacro,uniqueId,cmsMacro,macroUseInEditor,cmsMacro,macroRefreshRate,cmsMacro,macroAlias,cmsMacro,macroName,cmsMacro,macroCacheByPage,cmsMacro,macroCachePersonalized,cmsMacro,macroDontRender,cmsMacro,macroSource,cmsMacro,macroType,cmsMacroProperty,id,cmsMacroProperty,uniquePropertyId,cmsMacroProperty,editorAlias,cmsMacroProperty,macro,cmsMacroProperty,macroPropertySortOrder,cmsMacroProperty,macroPropertyAlias,cmsMacroProperty,macroPropertyName,cmsMemberType,pk,cmsMemberType,NodeId,cmsMemberType,propertytypeId,cmsMemberType,memberCanEdit,cmsMemberType,viewOnProfile,cmsMemberType,isSensitive,cmsMember,nodeId,cmsMember,Email,cmsMember,LoginName,cmsMember,Password,cmsMember2MemberGroup,Member,cmsMember2MemberGroup,MemberGroup,cmsPropertyTypeGroup,id,cmsPropertyTypeGroup,contenttypeNodeId,cmsPropertyTypeGroup,text,cmsPropertyTypeGroup,sortorder,cmsPropertyTypeGroup,uniqueID,cmsPropertyType,id,cmsPropertyType,dataTypeId,cmsPropertyType,contentTypeId,cmsPropertyType,propertyTypeGroupId,cmsPropertyType,Alias,cmsPropertyType,Name,cmsPropertyType,sortOrder,cmsPropertyType,mandatory,cmsPropertyType,validationRegExp,cmsPropertyType,Description,cmsPropertyType,variations,cmsPropertyType,UniqueID,umbracoPropertyData,id,umbracoPropertyData,versionId,umbracoPropertyData,propertyTypeId,umbracoPropertyData,languageId,umbracoPropertyData,segment,umbracoPropertyData,intValue,umbracoPropertyData,decimalValue,umbracoPropertyData,dateValue,umbracoPropertyData,varcharValue,umbracoPropertyData,textValue,umbracoRelationType,id,umbracoRelationType,typeUniqueId,umbracoRelationType,dual,umbracoRelationType,parentObjectType,umbracoRelationType,childObjectType,umbracoRelationType,name,umbracoRelationType,alias,umbracoRelation,id,umbracoRelation,parentId,umbracoRelation,childId,umbracoRelation,relType,umbracoRelation,datetime,umbracoRelation,comment,cmsTags,id,cmsTags,group,cmsTags,languageId,cmsTags,tag,cmsTagRelationship,nodeId,cmsTagRelationship,tagId,cmsTagRelationship,propertyTypeId,cmsContentType2ContentType,parentContentTypeId,cmsContentType2ContentType,childContentTypeId,cmsContentTypeAllowedContentType,Id,cmsContentTypeAllowedContentType,AllowedId,cmsContentTypeAllowedContentType,SortOrder,umbracoUser2NodeNotify,userId,umbracoUser2NodeNotify,nodeId,umbracoUser2NodeNotify,action,umbracoServer,id,umbracoServer,address,umbracoServer,computerName,umbracoServer,registeredDate,umbracoServer,lastNotifiedDate,umbracoServer,isActive,umbracoServer,isMaster,umbracoAccess,id,umbracoAccess,nodeId,umbracoAccess,loginNodeId,umbracoAccess,noAccessNodeId,umbracoAccess,createDate,umbracoAccess,updateDate,umbracoAccessRule,id,umbracoAccessRule,accessId,umbracoAccessRule,ruleValue,umbracoAccessRule,ruleType,umbracoAccessRule,createDate,umbracoAccessRule,updateDate,umbracoCacheInstruction,id,umbracoCacheInstruction,utcStamp,umbracoCacheInstruction,jsonInstruction,umbracoCacheInstruction,originated,umbracoCacheInstruction,instructionCount,umbracoExternalLogin,id,umbracoExternalLogin,userId,umbracoExternalLogin,loginProvider,umbracoExternalLogin,providerKey,umbracoExternalLogin,createDate,umbracoRedirectUrl,id,umbracoRedirectUrl,contentKey,umbracoRedirectUrl,createDateUtc,umbracoRedirectUrl,url,umbracoRedirectUrl,culture,umbracoRedirectUrl,urlHash,umbracoLock,id,umbracoLock,value,umbracoLock,name,umbracoUserGroup,id,umbracoUserGroup,userGroupAlias,umbracoUserGroup,userGroupName,umbracoUserGroup,userGroupDefaultPermissions,umbracoUserGroup,createDate,umbracoUserGroup,updateDate,umbracoUserGroup,icon,umbracoUserGroup,startContentId,umbracoUserGroup,startMediaId,umbracoUser2UserGroup,userId,umbracoUser2UserGroup,userGroupId,umbracoUserGroup2NodePermission,userGroupId,umbracoUserGroup2NodePermission,nodeId,umbracoUserGroup2NodePermission,permission,umbracoUserGroup2App,userGroupId,umbracoUserGroup2App,app,umbracoUserStartNode,id,umbracoUserStartNode,userId,umbracoUserStartNode,startNode,umbracoUserStartNode,startNodeType,cmsContentNu,nodeId,cmsContentNu,published,cmsContentNu,data,cmsContentNu,rv,umbracoDocumentVersion,id,umbracoDocumentVersion,templateId,umbracoDocumentVersion,published,umbracoKeyValue,key,umbracoKeyValue,value,umbracoKeyValue,updated,umbracoUserLogin,sessionId,umbracoUserLogin,userId,umbracoUserLogin,loggedInUtc,umbracoUserLogin,lastValidatedUtc,umbracoUserLogin,loggedOutUtc,umbracoUserLogin,ipAddress,umbracoConsent,id,umbracoConsent,current,umbracoConsent,source,umbracoConsent,context,umbracoConsent,action,umbracoConsent,createDate,umbracoConsent,state,umbracoConsent,comment,umbracoAudit,id,umbracoAudit,performingUserId,umbracoAudit,performingDetails,umbracoAudit,performingIp,umbracoAudit,eventDateUtc,umbracoAudit,affectedUserId,umbracoAudit,affectedDetails,umbracoAudit,eventType,umbracoAudit,eventDetails,umbracoContentVersionCultureVariation,id,umbracoContentVersionCultureVariation,versionId,umbracoContentVersionCultureVariation,languageId,umbracoContentVersionCultureVariation,name,umbracoContentVersionCultureVariation,date,umbracoContentVersionCultureVariation,availableUserId,umbracoDocumentCultureVariation,id,umbracoDocumentCultureVariation,nodeId,umbracoDocumentCultureVariation,languageId,umbracoDocumentCultureVariation,edited,umbracoDocumentCultureVariation,available,umbracoDocumentCultureVariation,published,umbracoDocumentCultureVariation,name,umbracoContentSchedule,id,umbracoContentSchedule,nodeId,umbracoContentSchedule,languageId,umbracoContentSchedule,date,umbracoContentSchedule,action\r\n \r\nThe following constraints (Primary Keys, Foreign Keys and Indexes) were found in the database, but are not in the current schema:\r\nFK_umbracoNode_umbracoNode_id,FK_umbracoNode_umbracoUser_id,FK_cmsContentType_umbracoNode_id,FK_cmsTemplate_umbracoNode,FK_umbracoContent_umbracoNode_id,FK_umbracoContent_cmsContentType_NodeId,FK_umbracoContentVersion_umbracoContent_nodeId,FK_umbracoContentVersion_umbracoUser_id,FK_umbracoMediaVersion_umbracoContentVersion_id,FK_umbracoDocument_umbracoContent_nodeId,FK_cmsDocumentType_cmsContentType_nodeId,FK_cmsDocumentType_umbracoNode_id,FK_cmsDocumentType_cmsTemplate_nodeId,FK_umbracoDataType_umbracoNode_id,FK_cmsDictionary_cmsDictionary_id,FK_umbracoLanguage_umbracoLanguage_id,FK_cmsLanguageText_umbracoLanguage_id,FK_cmsLanguageText_cmsDictionary_id,FK_umbracoDomain_umbracoNode_id,FK_umbracoLog_umbracoUser_id,FK_cmsMacroProperty_cmsMacro_id,FK_cmsMemberType_umbracoNode_id,FK_cmsMemberType_cmsContentType_nodeId,FK_cmsMember_umbracoContent_nodeId,FK_cmsMember2MemberGroup_cmsMember_nodeId,FK_cmsMember2MemberGroup_umbracoNode_id,FK_cmsPropertyTypeGroup_cmsContentType_nodeId,FK_cmsPropertyType_umbracoDataType_nodeId,FK_cmsPropertyType_cmsContentType_nodeId,FK_cmsPropertyType_cmsPropertyTypeGroup_id,FK_umbracoPropertyData_umbracoContentVersion_id,FK_umbracoPropertyData_cmsPropertyType_id,FK_umbracoPropertyData_umbracoLanguage_id,FK_umbracoRelation_umbracoNode,FK_umbracoRelation_umbracoNode1,FK_umbracoRelation_umbracoRelationType_id,FK_cmsTags_umbracoLanguage_id,FK_cmsTagRelationship_cmsContent,FK_cmsTagRelationship_cmsTags_id,FK_cmsTagRelationship_cmsPropertyType,FK_cmsContentType2ContentType_umbracoNode_parent,FK_cmsContentType2ContentType_umbracoNode_child,FK_cmsContentTypeAllowedContentType_cmsContentType,FK_cmsContentTypeAllowedContentType_cmsContentType1,FK_umbracoUser2NodeNotify_umbracoUser_id,FK_umbracoUser2NodeNotify_umbracoNode_id,FK_umbracoAccess_umbracoNode_id,FK_umbracoAccess_umbracoNode_id1,FK_umbracoAccess_umbracoNode_id2,FK_umbracoAccessRule_umbracoAccess_id,FK_umbracoRedirectUrl_umbracoNode_uniqueID,FK_startContentId_umbracoNode_id,FK_startMediaId_umbracoNode_id,FK_umbracoUser2UserGroup_umbracoUser_id,FK_umbracoUser2UserGroup_umbracoUserGroup_id,FK_umbracoUserGroup2NodePermission_umbracoUserGroup_id,FK_umbracoUserGroup2NodePermission_umbracoNode_id,FK_umbracoUserGroup2App_umbracoUserGroup_id,FK_umbracoUserStartNode_umbracoUser_id,FK_umbracoUserStartNode_umbracoNode_id,FK_cmsContentNu_umbracoContent_nodeId,FK_umbracoDocumentVersion_umbracoContentVersion_id,FK_umbracoDocumentVersion_cmsTemplate_nodeId,FK_umbracoUserLogin_umbracoUser_id,FK_umbracoContentVersionCultureVariation_umbracoContentVersion_id,FK_umbracoContentVersionCultureVariation_umbracoLanguage_id,FK_umbracoContentVersionCultureVariation_umbracoUser_id,FK_umbracoDocumentCultureVariation_umbracoNode_id,FK_umbracoDocumentCultureVariation_umbracoLanguage_id,FK_umbracoContentSchedule_umbracoContent_nodeId,FK_umbracoContentSchedule_umbracoLanguage_id,PK_user,PK_umbracoNode,PK_cmsContentType,PK_cmsTemplate,PK_umbracoContent,PK_umbracoContentVersion,PK_umbracoMediaVersion,PK_umbracoDocument,PK_cmsDocumentType,PK_umbracoDataType,PK_cmsDictionary,PK_umbracoLanguage,PK_cmsLanguageText,PK_umbracoDomain,PK_umbracoLog,PK_cmsMacro,PK_cmsMacroProperty,PK_cmsMemberType,PK_cmsMember,PK_cmsMember2MemberGroup,PK_cmsPropertyTypeGroup,PK_cmsPropertyType,PK_umbracoPropertyData,PK_umbracoRelationType,PK_umbracoRelation,PK_cmsTags,PK_cmsTagRelationship,PK_cmsContentType2ContentType,PK_cmsContentTypeAllowedContentType,PK_umbracoUser2NodeNotify,PK_umbracoServer,PK_umbracoAccess,PK_umbracoAccessRule,PK_umbracoCacheInstruction,PK_umbracoExternalLogin,PK_umbracoRedirectUrl,PK_umbracoLock,PK_umbracoUserGroup,PK_user2userGroup,PK_umbracoUserGroup2NodePermission,PK_userGroup2App,PK_userStartNode,PK_cmsContentNu,PK_umbracoDocumentVersion,PK_umbracoKeyValue,PK_umbracoUserLogin,PK_umbracoConsent,PK_umbracoAudit,PK_umbracoContentVersionCultureVariation,PK_umbracoDocumentCultureVariation,PK_umbracoContentSchedule\r\n \r\nThe following indexes were found in the database, but are not in the current schema:\r\nIX_umbracoUser_userLogin,IX_umbracoNode_UniqueId,IX_umbracoNode_ParentId,IX_umbracoNode_Path,IX_umbracoNode_Trashed,IX_umbracoNode_ObjectType,IX_cmsContentType,IX_cmsContentType_icon,IX_cmsTemplate_nodeId,IX_umbracoMediaVersion,IX_umbracoDocument_Published,IX_cmsDictionary_id,IX_cmsDictionary_key,IX_umbracoLanguage_languageISOCode,IX_umbracoLanguage_fallbackLanguageId,IX_umbracoLog,IX_cmsMacro_UniqueId,IX_cmsMacroPropertyAlias,IX_cmsMacroProperty_UniquePropertyId,IX_cmsMacroProperty_Alias,IX_cmsMember_LoginName,IX_cmsPropertyTypeGroupUniqueID,IX_cmsPropertyTypeAlias,IX_cmsPropertyTypeUniqueID,IX_umbracoPropertyData_VersionId,IX_umbracoPropertyData_PropertyTypeId,IX_umbracoPropertyData_LanguageId,IX_umbracoPropertyData_Segment,IX_umbracoRelationType_UniqueId,IX_umbracoRelationType_name,IX_umbracoRelationType_alias,IX_umbracoRelation_parentChildType,IX_cmsTags_LanguageId,IX_cmsTags,IX_computerName,IX_umbracoServer_isActive,IX_umbracoAccess_nodeId,IX_umbracoAccessRule,IX_umbracoRedirectUrl,IX_umbracoUserGroup_userGroupAlias,IX_umbracoUserGroup_userGroupName,IX_umbracoUser2NodePermission_nodeId,IX_umbracoUserStartNode_startNodeType,IX_umbracoUserLogin_lastValidatedUtc,IX_umbracoContentVersionCultureVariation_VersionId,IX_umbracoContentVersionCultureVariation_LanguageId,IX_umbracoDocumentCultureVariation_NodeId,IX_umbracoDocumentCultureVariation_LanguageId\r\n \r\n",
"SourceContext": "Umbraco.Core.Migrations.Install.DatabaseBuilder",
"ProcessId": 13248,
"ProcessName": "iisexpress",
"ThreadId": 16,
"AppDomainId": 4,
"AppDomainAppId": "LMW3SVC3ROOT",
"MachineName": "My_Machine_Name",
"Log4NetLevel": "INFO ",
"HttpRequestNumber": 4,
"HttpRequestId": "e67f1e83-0f7b-4a05-bc43-eb401576fab9"
} {
"#t": "2020-02-21T10:23:29.1476954Z",
"#mt": "Installation step {Step} failed.",
"#l": "Error",
"#x": "System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.\r\n at System.Data.SqlClient.SqlTransaction.ZombieCheck()\r\n at System.Data.SqlClient.SqlTransaction.Commit()\r\n at StackExchange.Profiling.Data.ProfiledDbTransaction.Commit() in C:\\projects\\dotnet\\src\\MiniProfiler.Shared\\Data\\ProfiledDbTransaction.cs:line 45\r\n at NPoco.Database.CompleteTransaction()\r\n at Umbraco.Core.Scoping.Scope.DisposeLastScope() in d:\\a\\1\\s\\src\\Umbraco.Core\\Scoping\\Scope.cs:line 388\r\n at Umbraco.Core.Scoping.Scope.Dispose() in d:\\a\\1\\s\\src\\Umbraco.Core\\Scoping\\Scope.cs:line 363\r\n at Umbraco.Core.Migrations.Install.DatabaseBuilder.CreateSchemaAndData() in d:\\a\\1\\s\\src\\Umbraco.Core\\Migrations\\Install\\DatabaseBuilder.cs:line 418\r\n at Umbraco.Web.Install.InstallSteps.DatabaseInstallStep.ExecuteAsync(Object model) in d:\\a\\1\\s\\src\\Umbraco.Web\\Install\\InstallSteps\\DatabaseInstallStep.cs:line 33\r\n --- End of inner exception stack trace ---\r\n at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)\r\n at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)\r\n at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n at Umbraco.Web.Install.Controllers.InstallApiController.<ExecuteStepAsync>d__14.MoveNext() in d:\\a\\1\\s\\src\\Umbraco.Web\\Install\\Controllers\\InstallApiController.cs:line 236\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)\r\n at Umbraco.Web.Install.Controllers.InstallApiController.<PostPerformInstall>d__11.MoveNext() in d:\\a\\1\\s\\src\\Umbraco.Web\\Install\\Controllers\\InstallApiController.cs:line 104",
"Step": "DatabaseInstall",
"SourceContext": "Umbraco.Web.Install.Controllers.InstallApiController",
"ProcessId": 13248,
"ProcessName": "iisexpress",
"ThreadId": 16,
"AppDomainId": 4,
"AppDomainAppId": "LMW3SVC3ROOT",
"MachineName": "My_Machine_Name",
"Log4NetLevel": "ERROR",
"HttpRequestNumber": 4,
"HttpRequestId": "e67f1e83-0f7b-4a05-bc43-eb401576fab9"
} {
"#t": "2020-02-21T10:23:29.1476954Z",
"#mt": "{EndMessage} ({Duration}ms) [Timing {TimingId}]",
"EndMessage": "Step completed",
"Duration": 375,
"TimingId": "92b0a88",
"SourceContext": "Umbraco.Web.Install.Controllers.InstallApiController",
"ProcessId": 13248,
"ProcessName": "iisexpress",
"ThreadId": 16,
"AppDomainId": 4,
"AppDomainAppId": "LMW3SVC3ROOT",
"MachineName": "My_Machine_Name",
"Log4NetLevel": "INFO ",
"HttpRequestNumber": 4,
"HttpRequestId": "e67f1e83-0f7b-4a05-bc43-eb401576fab9"
} {
"#t": "2020-02-21T10:23:29.1476954Z",
"#mt": "An error occurred during installation step {Step}",
"#l": "Error",
"#x": "System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.\r\n at System.Data.SqlClient.SqlTransaction.ZombieCheck()\r\n at System.Data.SqlClient.SqlTransaction.Commit()\r\n at StackExchange.Profiling.Data.ProfiledDbTransaction.Commit() in C:\\projects\\dotnet\\src\\MiniProfiler.Shared\\Data\\ProfiledDbTransaction.cs:line 45\r\n at NPoco.Database.CompleteTransaction()\r\n at Umbraco.Core.Scoping.Scope.DisposeLastScope() in d:\\a\\1\\s\\src\\Umbraco.Core\\Scoping\\Scope.cs:line 388\r\n at Umbraco.Core.Scoping.Scope.Dispose() in d:\\a\\1\\s\\src\\Umbraco.Core\\Scoping\\Scope.cs:line 363\r\n at Umbraco.Core.Migrations.Install.DatabaseBuilder.CreateSchemaAndData() in d:\\a\\1\\s\\src\\Umbraco.Core\\Migrations\\Install\\DatabaseBuilder.cs:line 418\r\n at Umbraco.Web.Install.InstallSteps.DatabaseInstallStep.ExecuteAsync(Object model) in d:\\a\\1\\s\\src\\Umbraco.Web\\Install\\InstallSteps\\DatabaseInstallStep.cs:line 33\r\n --- End of inner exception stack trace ---\r\n at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)\r\n at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)\r\n at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n at Umbraco.Web.Install.Controllers.InstallApiController.<ExecuteStepAsync>d__14.MoveNext() in d:\\a\\1\\s\\src\\Umbraco.Web\\Install\\Controllers\\InstallApiController.cs:line 236\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)\r\n at Umbraco.Web.Install.Controllers.InstallApiController.<PostPerformInstall>d__11.MoveNext() in d:\\a\\1\\s\\src\\Umbraco.Web\\Install\\Controllers\\InstallApiController.cs:line 104",
"Step": "DatabaseInstall",
"SourceContext": "Umbraco.Web.Install.Controllers.InstallApiController",
"ProcessId": 13248,
"ProcessName": "iisexpress",
"ThreadId": 16,
"AppDomainId": 4,
"AppDomainAppId": "LMW3SVC3ROOT",
"MachineName": "My_Machine_Name",
"Log4NetLevel": "ERROR",
"HttpRequestNumber": 4,
"HttpRequestId": "e67f1e83-0f7b-4a05-bc43-eb401576fab9"
}

I couln't find the source of issue, and If someone knows what's wrong in question and how to solve the problem I would appreciate it and mark her/his answer as accepted. But for now here is how I made Umbraco to work in my project:
Install Umbraco with SQL Server CE (default option)
Convert Umbraco.sdf file to .sql file using Microsoft SQL Server Compact 4.0 and SQL Server Compact Toolbox (Standalone) (Here is how).
Create Umbraco SQL Server database then generate tables and their content using the .sql file.
Replace ConnectionString and DbProviderFactories in web.config file like below:
.
<connectionStrings>
<remove name="umbracoDbDSN" />
<add name="umbracoDbDSN" connectionString="Server=serveName;Database=dbName;User ID=userId;Password=password" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SqlClient" />
<add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</DbProviderFactories>
</system.data>

I encountered the same exact error during an Umbraco V8 install and was able to fix it by granting db_owner access to the user on the database level. I had done already granted access but this was probably on the wrong level.
Solution
Select the database in which the Umbraco Install will be configured and open a new query.
ALTER ROLE db_owner ADD MEMBER [username];
If you do not yet have a user for the database:
Create a SQL Login
CREATE LOGIN username
WITH PASSWORD = '<Strong_Password_Goes_Here>';
The login should be visible in the file tree under [YOUR-Server-Name]/Security/Logins
Create a database user (run a new script on the database in the SQL server)
CREATE USER [username]
FROM LOGIN [username]
WITH DEFAULT_SCHEMA=dbo;
Grant role permission as shown above.
Run the install again.

Related

Exception has been thrown by the target of an invocation, in jenkins' groovy script

I need to maintain a jenkins groovy script (we are not sure however if it ever worked).The script for a pipeline build has multiple stages ('revision' and 'build' stages before 'unit tests' have succeeded), one of which is the following:
stage('Unit Tests')
{
stages
{
stage('Tests')
{
parallel
{
stage('TRKengineTest')
{
steps
{
bat '"C:\\Program Files (x86)\\NUnit.org\\nunit-console\\nunit3-console.exe" TRKengine\\TRKengine.Test\\bin\\Release\\netcoreapp3.1\\TRKengine.Test.dll --result=TRKengine.Test.xml;format=nunit2 --timeout=180000 --workers=1'
echo "Something to do?"
}
}
stage('TRKengineGUItest')
{
steps
{
//bat '"C:\\Program Files (x86)\\NUnit.org\\nunit-console\\nunit3-console.exe" TRKengine\\TRKengineGUI.Test\\bin\\Release\\netcoreapp3.1\\TRKengineGUI.Test.dll --result=TRKengineGUI.Test.xml;format=nunit2 --timeout=180000 -v --workers=1'
echo "Nothing to do"
}
}
}
}
stage('Testresults')
{
steps
{
nunit testResultsPattern: 'TRKengine.Test.xml, TRKengineGUI.Test.xml'
}
}
}
}
The bat command returns a -100 error. More precisely:
C:\Jenkins\workspace\TRKengine_trunk>"C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" TRKengine\TRKengine.Test\bin\Release\netcoreapp3.1\TRKengine.Test.dll --result=TRKengine.Test.xml;format=nunit2 --timeout=180000 -v --workers=1
NUnit Console Runner 3.6.1
Copyright (C) 2017 Charlie Poole
Runtime Environment
OS Version: Microsoft Windows NT 10.0.14393.0
CLR Version: 4.0.30319.42000
Test Files
TRKengine\TRKengine.Test\bin\Release\netcoreapp3.1\TRKengine.Test.dll
Errors, Failures and Warnings
1) Error :
Exception has been thrown by the target of an invocation.
Server stack trace:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)
at System.AppDomain.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityAttributes)
at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityAttributes)
at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityAttributes)
at NUnit.Engine.Drivers.NUnit3FrameworkDriver.Load(String testAssemblyPath, IDictionary`2 settings)
at NUnit.Engine.Runners.DirectTestRunner.LoadPackage()
at NUnit.Engine.Runners.DirectTestRunner.EnsurePackageIsLoaded()
at NUnit.Engine.Runners.DirectTestRunner.RunTests(ITestEventListener listener, TestFilter filter)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at NUnit.Engine.ITestEngineRunner.Run(ITestEventListener listener, TestFilter filter)
at NUnit.Engine.Runners.ProcessRunner.RunTests(ITestEventListener listener, TestFilter filter)
Test Run Summary
Overall result: Failed
Test Count: 0, Passed: 0, Failed: 0, Warnings: 0, Inconclusive: 0, Skipped: 0
Start time: 2020-07-15 11:32:42Z
End time: 2020-07-15 11:32:43Z
Duration: 0.556 seconds
Results (nunit2) saved as TRKengine.Test.xml
script returned exit code -100
I have tried a couple of things:
1)First of all, it seems like the path of nunit-console.exe is wrong but as I found out, it can be used in recent releases of nunit.
2)The path of the test.dll is correct, as I manually navigated there and ..netcoreapp3.1\TRKengine.Test.dll is indeed there.
3)I have spotted --result=TRKengine.Test.xml;format=nunit2 in other exampels across the internet.
4)I experimented with removing any combinations of the remaining parameters, workers/timeout -v etc, without success.
So the line where the error appears, seems to be correct, and my intuition is that probably the mistake has already happened somewhere else.
I am not sure what "invocation" means. I have also checked How do you run NUnit tests from Jenkins? that seems related and it feels like Winston33 's proposition is exactly like what is happening here.
Something that is a bit worrying is that my machine is 64 bits but the path is ..x86.
I also have access to code and all projects inside the solution build successfully
I am a total beginner in both jenkins and groovy, so if I had not disclosed any necessary information please notify me.
Any help would be greatly appreciated.
The error message: Exception has been thrown by the target of an invocation is a common message for C# based products
means that nunit tries to call the target test dll dynamically but it (dll) throws some exception that unfortunately you don't see.
check the nunit issue that is very close to yours https://github.com/nunit/nunit/issues/1509
there is suggestion to set following nunit parameters
--trace=Debug to see more information about error
--inprocess to run tests in a single process
there several log files should be created that could contain helpful information to understand why the error occurred.

TFS Warehouse / Coverage Analysis failing

I am running with TFS 2015.3, and SQL Server 2016 SP1, in separate servers.
Recently, I change our production TFS Database from 32 bit to 64 bit (for updating purposes), and I believe we loose some database configuration and permissions.
This week (after the change), we are having some issues with some Jobs, related to Warehouse and Coverage Analysis:
Screenshot of Failing Jobs
The error that is shown is:
Microsoft.TeamFoundation.Framework.Server.DatabaseOperationTimeoutException: TF246018: The database operation exceeded the timeout limit and has been cancelled. Verify that the parameters of the operation are correct. ---> System.Data.SqlClient.SqlException: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: The wait operation timed out --- End of inner exception stack trace --- at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteCommand(ExecuteType executeType, CommandBehavior behavior) --- End of inner exception stack trace --- at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.TranslateException(Int32 errorNumber, SqlException sqlException, SqlError sqlError) at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.TranslateException(SqlException sqlException) at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.MapException(SqlException ex, QueryExecutionState queryState) at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.HandleException(Exception exception) at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteCommand(ExecuteType executeType, CommandBehavior behavior) at Microsoft.VisualStudio.Services.CircuitBreaker.Command.<>c__DisplayClass7_0.b__0() at Microsoft.VisualStudio.Services.CircuitBreaker.CommandAsync.d__28.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.Services.CircuitBreaker.Command.Execute(Action run, Action fallback) at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteCommandWithBaseCircuitBreaker(ExecuteType executeType, CommandBehavior behavior) at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteNonQuery(Boolean bindReturnValue) at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteNonQuery() at Microsoft.TeamFoundation.TestManagement.Server.BuildCoverage.Update(TestManagementRequestContext context, Int32 coverageChangeId) at Microsoft.TeamFoundation.TestManagement.Server.Jobs.CoverageAnalyzer.AnalyzeBuild(BuildInfo buildInfo, String& resultMessage) at Microsoft.TeamFoundation.TestManagement.Server.Jobs.CoverageAnalyzer.Run(String& resultMessage) at Microsoft.TeamFoundation.TestManagement.Server.Jobs.CoverAnJob.Run(IVssRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime queueTime, String& resultMessage)
And also I got this one for another job:
[Test Management Warehouse Sync]: ---> MakeDataChanges() result=DataChangesPending. ---> MakeDataChanges() result=DataChangesPending. ---> MakeDataChanges() result=DataChangesPending. ---> Microsoft.TeamFoundation.Warehouse.WarehouseException: TF221122: An error occurred running job Test Management Warehouse Sync for team project collection or Team Foundation server Product. ---> Microsoft.TeamFoundation.Framework.Server.DatabaseOperationCanceledException: TF53001: The database operation was canceled by an administrator. ---> System.Data.SqlClient.SqlException: A severe error occurred on the current command. The results, if any, should be discarded. Operation cancelled by user. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteCommand(ExecuteType executeType, CommandBehavior behavior) --- End of inner exception stack trace --- at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.TranslateException(SqlException sqlException) at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.MapException(SqlException ex, QueryExecutionState queryState) at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.HandleException(Exception exception) at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteCommand(ExecuteType executeType, CommandBehavior behavior) at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteNonQuery(Boolean bindReturnValue) at Microsoft.TeamFoundation.Warehouse.WarehouseBatchedDataAccessComponent.ExecuteNonQuery() at Microsoft.TeamFoundation.TestManagement.Warehouse.TeamTestWarehouseAdapter.SaveBatchesToWarehouse() at Microsoft.TeamFoundation.TestManagement.Warehouse.TeamTestWarehouseAdapter.ProcessResults(WarehouseRowVersionQueryDelegate query, String highWaterMarkProperty, String processLimitProperty) at Microsoft.TeamFoundation.TestManagement.Warehouse.TeamTestWarehouseAdapter.MakeDataChanges() at Microsoft.TeamFoundation.Warehouse.WarehouseSyncJobExtension1.MakeDataChanges(IVssRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, String& resultMessage) at Microsoft.TeamFoundation.Warehouse.WarehouseSyncJobExtension`1.RunInternal(IVssRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime queueTime, String& resultMessage) at Microsoft.TeamFoundation.Warehouse.WarehouseJobExtension.Run(IVssRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime queueTime, String& resultMessage) --- End of inner exception stack trace ---
I am guessing this is due to a Database error, but I can't get to the bottom of it. I am using the TFS for automated Builds, and I am not able to see the Code Coverage for the most recent builds. I don't know if it is related. I went to the Application Tier, and Start a Rebuild for the Reporting services, and that works for some of the Build (the Code Coverage appears), but for the newer builds, it is not happening as expected (I run the Rebuild and still the Code Coverage is not shown).
Code Coverage not shown
Do you have any ideas on what is going on with those jobs? How can I solve this?
Thank you so much in advance. If you need any further information, please let me know.

HostGator MVC Upload

I am trying to upload my ASP.NET MVC app to hostgator but I keep receiving this error:
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SecurityException: Request failed.]
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) +166
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) +100
System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +272
System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, RuntimeAssembly asm, SecurityAction action) +55
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +70
System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +39
System.Type.GetType(String typeName) +32
System.CodeDom.Compiler.CompilerInfo.get_IsCodeDomProviderTypeValid() +10
System.Web.Compilation.CompilationUtil.GetRecompilationHash(CompilationSection ps) +2085
System.Web.Configuration.CompilationSection.get_RecompilationHash() +107
System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDateInternal(Int64 cachedHash) +465
System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate(Int64 cachedHash) +51
System.Web.Compilation.BuildManager.ExecutePreAppStart() +132
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +521
I try to resolve it by adding <trust level="Full"/> but once I do I receive another error.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: This configuration section cannot be used at this path. This happens when the site administrator has locked access to this section using from an inherited configuration file.
Source Error:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
It says the error is on the same line as what i just added (<trust level="Full"/>). It just keeps going in circles and I don't know what else to do. If anyone has any ideas it would be a huge help. Thank you!

Build Warehouse Sync job fails after upgrade to TFS 2013 (timeout)

After upgrading to TFS 2013 the Build Warehouse Job fails with a timeout exception. Rebuilding the Warehouse and Analysis databases didn't help.
The exception is:
[Build Warehouse Sync]: ---> Microsoft.TeamFoundation.Warehouse.WarehouseException: TF221122: An error occurred running job Build Warehouse Sync for team project collection or Team Foundation server xxxxxx. ---> Microsoft.TeamFoundation.Framework.Server.DatabaseOperationTimeoutException: TF246018: The database operation exceeded the timeout limit and has been cancelled. Verify that the parameters of the operation are correct. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: The wait operation timed out
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
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, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.Execute(ExecuteType executeType, CommandBehavior behavior)
--- End of inner exception stack trace ---
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.TranslateException(Int32 errorNumber, SqlException sqlException, SqlError sqlError)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.TranslateException(SqlException sqlException)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.MapException(SqlException ex, QueryExecutionState queryState)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.HandleException(Exception exception)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.Execute(ExecuteType executeType, CommandBehavior behavior)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationSqlResourceComponent.ExecuteReader()
at Microsoft.TeamFoundation.Build.Server.DataAccess.BuildInformationComponent3.QueryBuildInformation(ICollection`1 uris, IList`1 informationTypes)
at Microsoft.TeamFoundation.Build.Server.BuildInformationMerger.TryMergeNext()
at Microsoft.TeamFoundation.Build.Server.CommandQueryChangedBuilds.ContinueExecution()
at Microsoft.TeamFoundation.Build.Server.CommandQueryChangedBuilds.Execute(IList`1 teamProjects, DateTime minChangedTime, BuildStatus statusFilter, IList`1 informationTypes)
at Microsoft.TeamFoundation.Build.Server.TeamFoundationBuildService.QueryChangedBuilds(TeamFoundationRequestContext requestContext, IList`1 teamProjects, DateTime minChangedTime, BuildStatus statusFilter, IList`1 informationTypes)
at Microsoft.TeamFoundation.Build.Adapter.TeamBuildWarehouseAdapter.ProcessAndUploadBuildData()
at Microsoft.TeamFoundation.Build.Adapter.TeamBuildWarehouseAdapter.MakeDataChanges()
at Microsoft.TeamFoundation.Warehouse.WarehouseSyncJobExtension`1.MakeDataChanges(TeamFoundationRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, String& resultMessage)
at Microsoft.TeamFoundation.Warehouse.WarehouseSyncJobExtension`1.RunInternal(TeamFoundationRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime queueTime, String& resultMessage)
at Microsoft.TeamFoundation.Warehouse.WarehouseJobExtension.Run(TeamFoundationRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime queueTime, String& resultMessage)
--- End of inner exception stack trace ---
I've also posted a Microsoft Connect feedback bug
It's a long story, but you can find the solution here:
Connect issue 811443
The reason for this fail is that when the TFS database is huge then the warehouse sync job is unable to complete the sync in time. This could happen with a smaller database with an incremental job too if the delta is huge. The fix (or actually workaround) is to delete the store procedure that is responsible for that and replace it with one that has a TOP 1000 or TOP 10000 in the TSQL, which makes it sync only part of the data. The stored procedures in Tfs_DefaultCollection are encrypted so you need to ask Microsoft via support to provide you with the sql for it. They know more. Of course this can't be a permanent fix and is a nice workaround available through Microsoft support only :)

asp.net mvc tutorial project

I'm having some trouble getting the code to work from the book "Pro ASP.NET MVC Framework." I'm on page 96 for those that may have worked through this book before. When I run the code I get the following:
System.Data.SqlClient.SqlException was unhandled by user code
Message="Invalid object name 'Products'."
Source=".Net SqlClient Data Provider"
ErrorCode=-2146232060
Class=16
LineNumber=1
Number=208
Procedure=""
Server=".\\SQLEXPRESSADV"
State=1
StackTrace:
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.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
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.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader()
at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
at System.Data.Linq.Table`1.GetEnumerator()
at System.Data.Linq.Table`1.System.Collections.Generic.IEnumerable<TEntity>.GetEnumerator()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at WebUI.Controllers.ProductsController.List() in C:\Documents and Settings\adamsb1\My Documents\Visual Studio 2008\Projects\StoreSolution\WebUI\Controllers\ProductsController.cs:line 28
at lambda_method(ExecutionScope , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
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.<>c__DisplayClassa.<InvokeActionMethodWithFilters>b__7()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
InnerException:
All my code builds fine with no errors and it appears to be identical to the book. However, I can't get this to work. I'm an old school asp guy so this is all new to me.
The error is in the database. Either the connection string you have provided points to the wrong database, or the database you are using is missing the table "Products", which is expected to be there.
Since it looks like you are using an SQLExpress database, I might guess that you haven't setup the tutorials database - the program is trying to read from whatever SQLExpress database you already have setup on your machine.
Problem solved!
David you pointed me in the right direction...thanks!
I swapped out the following on my connection string:
OLD:
Server=.\SQLEXPRESSADV.SportsStore;Trusted_Connection=yes;"
For the one below and it works now.
NEW:
Data Source=.\SQLEXPRESSADV;Initial Catalog=SportsStore;Integrated Security=True;Pooling=False

Resources