Correlation ID when trying to create a sub site in SharePoint 2010? Try using the ole create.aspx page

So this was an interesting one. First off, curses to the third party vendor who will remain nameless for requiring that we access their database on a sub site creation (ya, I followed their instructions to a tee, they need to fix their product…). Now on to the problem and resolution.

 

The Problem

When trying to create a sub site in a brand spanking SharePoint 2010 Site Collection, creation of the site would fail with the usual Correlation ID (note, creation of lists and libraries was aok). When checking the correlation ID we would only get details indicating incorrect closing of an object which didn’t prove helpful, particularly because we didn’t have anything custom in the environment (except for that 3rd party, who indicated they had installed fine and as a product, shouldn’t have anything to do with site creation). Effectively, what I had to work with when tracing back that Correlation ID on the server using my handy ULS Viewer was this Detected use of SPRequest for previously closed SPWeb object. Please close SPWeb objects when you are done with all objects obtained from them, but not before”.

 

The Solution

After MUCH seeking around (and wasting time, here’s hoping I save you some…) to see what the hell could have changed, it occurred to me that perhaps the Silverlight creation dialogue (you know, in SharePoint 2010 we now have this sassy Silverlight site and list creation popup) doesn’t actually get far enough to dump error information into the ULS (it trys/catch/fails) before dying.

 

So I thinks to meeself (I’m in Dublin as I write this and my friend Shane’s lucky charms and lingo are rubbing off on me). “Why not try creating the site using the way we did it in 2007/WSS and pull Silverlight out of the equation?” So, I went to try and create a site using /_layouts/create.aspx (I could have also disabled Silverlight in my browser as another approach). Sure enough, with Silverlight’s error catching out of the way, my ULS logs lit up like a Christmas tree and I was able to determine that the cursed 3rd party application that was recently installed (and shouldn’t have been a factor) was indeed, having issues. It couldn’t connect to its database using the content application pool account and thus, decided to just puke the whole thing out.

 

There you have it. A strange one with a now seemingly obvious fix, all based on the presentation layer disguising the truth.

 

Using Silverlight to create a sub site

I Get this…

Detected use of SPRequest for previously closed SPWeb object. Please close SPWeb objects when you are done with all objects obtained from them, but not before. Stack trace:

at Microsoft.SharePoint.WebControls.ScriptLink.SharePointClientJs_Register(Page page)

at Microsoft.SharePoint.WebControls.ScriptLink.InitJs_Register(Page page)

at Microsoft.SharePoint.WebControls.ScriptLink.RegisterForControl(Control ctrl, Page page, String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String language)

at Microsoft.SharePoint.WebControls.ScriptLink.Register(Page page, String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String language, String uiVersion)

at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Page page, String strKey, String strFile, Boolean localizable)

at Microsoft.SharePoint.WebControls.ScriptLink.RegisterCore(Page page, Boolean defer)

at Microsoft.SharePoint.WebPartPages.SPWebPartManager.RegisterOWSScript(Page page, SPWeb web)

at Microsoft.SharePoint.WebPartPages.WebPartPage.FormOnLoad(Object sender, EventArgs e)

at System.Web.UI.Control.OnLoad(EventArgs e)

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

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.ProcessRequest(HttpContext context)

at ASP._layouts_addgallery_aspx.ProcessRequest(HttpContext context)

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)

at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)

at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)

at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

 

Using /_layouts/create.aspx to create a sub site

I Get this…

Exception attempting to ApplyWebTemplate to SPWeb http://portal.company.com/test3: System.Data.SqlClient.SqlException: Cannot open database “COMPANY_3rdPARTYDB” requested by the login. The login failed. Login failed for user ‘DOMAINAPPPOOLACCOUNT’.

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.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)

at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)

at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)

at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)

at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)

at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)

at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)

at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)

at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)

at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)

at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)

at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

at System.Data.SqlClient.SqlConnection.Open()

at Bluethread.SharePoint.3rdPARTYDB.Profile.a(IProfileType A_0, Guid A_1, String A_2, String A_3, Boolean A_4)

at Bluethread.SharePoint.3rdPARTYDB.Profile..ctor(IProfileType type, Guid scopeId, String id, Boolean useDefault)

at Bluethread.SharePoint.3rdPARTYDB.EBS.FeatureWeb.a.c()

at Microsoft.SharePoint.SPSecurity.c__DisplayClass4.b__2()

at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)

at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)

at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)

at Bluethread.SharePoint.3rdPARTYDB.EBS.FeatureWeb.FeatureActivated(SPFeatureReceiverProperties properties)

at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)

at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce)

at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly)

at Microsoft.SharePoint.SPTemplateAssociationElement.EnsureTemplateAssociatedWebFeaturesActivated(SPSite site, SPWeb web, String sTemplateName)

at Microsoft.SharePoint.SPFeatureManager.c__DisplayClass13.b__12()

at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param)

at Microsoft.SharePoint.SPFeatureManager.EnsureTemplateAssociatedWebFeaturesActivated(Byte[]& userToken, Guid& tranLockerId, Int32 nZone, Guid databaseid, Guid siteid, Guid webid, String sTemplateName)

at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)

at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)

at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate)

at Microsoft.SharePoint.ApplicationPages.TemplatePickerUtil.ApplyWebTemplateAndRedirect(SPWeb Web, String strWebTemplate, Nullable’1 bSharedNav, Boolean bOnTopNav, Boolean bOnQuickLaunch, Page page, Boolean bDeleteOnError) Attempting to delete the site collection

 

And this

 

System.Data.SqlClient.SqlException: Cannot open database “COMPANY_3rdPARTYDB” requested by the login. The login failed. Login failed for user ‘DOMAINAPPPOOLACCOUNT’.

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.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)

at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)

at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)

at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)

at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)

at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)

at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)

at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)

at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)

at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)

at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)

at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

at System.Data.SqlClient.SqlConnection.Open()

at Bluethread.SharePoint.3rdPARTYDB.Profile.a(IProfileType A_0, Guid A_1, String A_2, String A_3, Boolean A_4)

at Bluethread.SharePoint.3rdPARTYDB.Profile..ctor(IProfileType type, Guid scopeId, String id, Boolean useDefault)

at Bluethread.SharePoint.3rdPARTYDB.EBS.FeatureWeb.a.c()

at Microsoft.SharePoint.SPSecurity.c__DisplayClass4.b__2()

at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)

at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)

at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)

at Bluethread.SharePoint.3rdPARTYDB.EBS.FeatureWeb.FeatureActivated(SPFeatureReceiverProperties properties)

at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)

at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce)

at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly)

at Microsoft.SharePoint.SPTemplateAssociationElement.EnsureTemplateAssociatedWebFeaturesActivated(SPSite site, SPWeb web, String sTemplateName)

at Microsoft.SharePoint.SPFeatureManager.c__DisplayClass13.b__12()

at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param)

at Microsoft.SharePoint.SPFeatureManager.EnsureTemplateAssociatedWebFeaturesActivated(Byte[]& userToken, Guid& tranLockerId, Int32 nZone, Guid databaseid, Guid siteid, Guid webid, String sTemplateName)

at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)

at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, String& bstrWebTemplate, Int32& plWebTemplateId)

at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate)

at Microsoft.SharePoint.ApplicationPages.TemplatePickerUtil.ApplyWebTemplateAndRedirect(SPWeb Web, String strWebTemplate, Nullable’1 bSharedNav, Boolean bOnTopNav, Boolean bOnQuickLaunch, Page page, Boolean bDeleteOnError)

at Microsoft.SharePoint.ApplicationPages.NewSubwebPage.BtnCreateSubweb_Click(Object sender, EventArgs e)

at System.Web.UI.WebControls.Button.OnClick(EventArgs e)

at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)

at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

 

2 responses to “Correlation ID when trying to create a sub site in SharePoint 2010? Try using the ole create.aspx page

  1. This is just a thank you from someone out there who’s sanity you saved with this post. It was one of those “two hours Googling stuff, wishing I chose a different profession” sort of problems… All the other “solutions” were pointing me in the entirely wrong direction, and yours was the only one I found that helped.

    Thanks from some random developer.

    Cheers.

Comments are closed.