I'm trying to publish a WebMatrix DotNetNuke site to a shared hosting environment. The files publish just fine however publishing the database is causing some issues.
Here is a snippet from the WebMatrix publishing log (I've redacted the actual SQL username and SQL host - the stuff in [square brackets]):
02:03:59: Adding dbFullSql (user id=[username];database=[dbname];server=[server]). 02:03:59: The database '[dbname]' could not be created. 02:03:59: Retrying operation 'Add' on object dbFullSql (user id=[username];database=[dbname];server=[server]). Attempt 1 of 2. 02:03:59: The database '[dbname]' could not be created. 02:03:59: Retrying operation 'Add' on object dbFullSql (user id=[username];database=[dbname];server=[server]). Attempt 2 of 2. 02:03:59: Unable to publish. 02:03:59: Unable to publish. Unable to publish. 02:03:59: Error detail: 02:03:59: (06/02/2011 02:03:59) An error occurred when the request was processed on the remote computer. 02:03:59: at Microsoft.Web.Deployment.StatusThreadHandler.CheckForException() 02:03:59: at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext) 02:03:59: at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable) 02:03:59: at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions) 02:03:59: at Microsoft.Web.Deployment.DeploymentObject.SyncTo(String provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions) 02:03:59: at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentWellKnownProvider provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions) 02:03:59: at Microsoft.WebMatrix.Deployment.MsDeployWorker.Execute(Boolean pullback) 02:03:59: The database '[dbname]' could not be created.
From the log above it's pretty evident that the DotNetNuke WebDeploy package is attempting to create the database. The database already exists and I can connect to it remotely just fine using SQL Management Studio.
Because this is a hosted shared SQL environment the hoster isn't going to permit users to create databases. The SQL Database user/login on the hosted SQL server is the database's dbowner.
Is this a bug in the WebMatrix DNN WebDeploy publishing package?
Are there any workarounds?
This is using WebMatrix 1.0 RTM and the DotNetNuke application downloaded from the WebMatrix Application Gallery. I created a local SQL Express database to prime the DNN site with some content. Everything works great and now I'm trying to publish to the shared host environment where the database is already created.