WebMatrix’s Web Deploy (for WordPress Brandoo) cannot access remote MSSQL database

I am having trouble configuring the databases MSSQL for WebDeploy (for a WordPress Brandoo site). I will show the steps that have seemed to be correct so far. I am very new at this and it has taken me days just to get this far:

  1. Installed WebMatrix on local and remote computers.

    Read More
  2. Installed WordPress Brandoo on local using Web Platform Installer.

  3. Created an empty site in ISS on Remote, added permissions and enabled remote management.

  4. On remote computer, using Web Matrix, I opened the site folder (the empty site I created in ISS), right-clicked and chose “New SQL Server Connection”. For “Database” I put the same database name as my local WordPress. I chose “Database Authentication” and put in the same WordPress username and password as my local machine but but I got an error message:

    Login failed for user 'wordpressuser652'.
    
    System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'wordpressuser652'.
    at System.Data.SqlClient.SqlInternalConnection.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.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, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
    at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
    at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
    at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
    at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
    at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
    at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
    at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
    at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
    at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
    at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
    at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
    at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
    at System.Data.SqlClient.SqlConnection.Open()
    at Microsoft.WebMatrix.DatabaseManager.SqlDatabase.SqlDatabaseProvider.TestConnection(String connectionString)
    at Microsoft.WebMatrix.DatabaseManager.IisDbManagerModuleService.TestConnection(DatabaseConnection databaseConnection, String configPathState)
    at Microsoft.WebMatrix.DatabaseManager.Client.ClientConnection.Test(ManagementConfigurationPath configPath)
    at Microsoft.WebMatrix.DatabaseManager.Client.DatabaseHierarchyInfo.EnsureLoaded()
    ClientConnectionId:2cd9db2c-94bc-4838-b6b7-758b5d6cbca0
    
  5. So instead I chose “Windows Authenticaiton”. The database appeared in the WebMatrix database section (althought it didn’t have tables like on the local machine.

  6. I right clikced the new databse connection on the remote WebMatrix and chose “copy connection string”. Then I went to IIS on the remote computer, right clicked my site and chose Web Deploy>Configure Web Deploy Publishing. I pasted in the connection string and sent PublishSettings the file to the local computer.

  7. On the local computer, in Web Matrix, I clicked to publish my site and opened the PublishSettings file. I had to put in my IP address instead of the default url provided. The settings were vailidated successfully.

Validation successful image

But during the publish compatibility test it said the database was not available:

Database not available

When I tried to continue I got the following error:

enter image description here

Clicking “Copy Details” gave the following error:

    Could not publish the site. Could not publish to the remote database. Please ensure the publish profile contains a database and verify that the remote database is accessible.
    Error detail:
    (20/03/2015 5:23:56 PM) An error occurred when the request was processed on the remote computer.
    at Microsoft.Web.Deployment.StatusThreadHandler.CheckForException()
    at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext, Nullable`1 syncPass, String syncSessionId)
    at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
    at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
    at Microsoft.Web.Deployment.DeploymentObject.SyncTo(String provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
    at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentWellKnownProvider provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
    at Microsoft.WebMatrix.Deployment.WebDeployWorker.Execute(CommandManager commandManager, CertificateValidationService certificateValidationService, Boolean skipHiddenFiles)
    Missing source parameter 'Database User Password' (Password for the database user name.). This must be set for successful synchronization.
    at Microsoft.Web.Deployment.ParameterizationRuleHandler.PreSync(DeploymentSyncContext syncContext)
    at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)
    at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
    at Microsoft.Web.Deployment.DeploymentAgent.HandleSync(DeploymentAgentAsyncData asyncData, Nullable`1 passId)

It says the database user password is missing. But I have used Windows Authentication on the server and specified that in the connection string. Is it necessary to use Database Authentication on the server? If so is anybody able to tell me why Database Authentication could not connect on the server (according to the first error message)? Am I doing this all wrong? is there an easier way? If you know how to do it I would really appreciate some simple steps because I am very new to this. Much appreciated.

Additional info:

Local system: Windows 7.

Remote system: Windows Server 2012, IIS 8.

Web Matrix 3

Related posts

Leave a Reply