WebMatrix的Web部署(适用于Wordpress Brandoo)无法访问远程MSSQL数据库

时间:2015-03-20 09:18:36

标签: sql-server wordpress webmatrix webdeploy

我无法为WebDeploy配置数据库MSSQL(对于Wordpress Brandoo站点)。到目前为止,我将展示似乎正确的步骤。我在这方面很陌生,为了达到这个目的,我花了几天时间:

  1. 在本地和远程计算机上安装了WebMatrix。

  2. 使用Web平台安装程序在本地安装Wordpress Brandoo。

  3. 在远程ISS中创建了一个空站点,添加了权限并启用了远程管理。

  4. 在远程计算机上,使用Web Matrix,我打开了站点文件夹(我在ISS中创建的空站点),右键单击并选择"新SQL Server连接"。对于"数据库"我把相同的数据库名称作为我的本地Wordpress。我选择了#34;数据库身份验证"并输入与我的本地机器相同的Wordpress用户名和密码,但我收到一条错误消息:

    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. 所以我选择了" Windows Authenticaonon"。该数据库出现在WebMatrix数据库部分(尽管它没有像本地计算机那样的表。

  6. 我在远程WebMatrix上找到了新的数据库连接并选择了#34;复制连接字符串"。然后我转到远程计算机上的IIS,右键单击我的站点并选择Web Deploy>配置Web部署发布。我粘贴在连接字符串中,并将PublishSettings文件发送到本地计算机。

  7. 在本地计算机上,在Web Matrix中,我单击以发布我的站点并打开PublishSettings文件。我不得不输入我的IP地址而不是提供的默认网址。设置已成功通过。

  8. Validation successful image

    但是在发布兼容性测试期间,它说数据库不可用:

    Database not available

    当我试图继续时,我收到以下错误:

    enter image description here

    点击"复制详细信息"发出以下错误:

        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)
    

    它表示缺少数据库用户密码。但是我在服务器上使用了Windows身份验证,并在连接字符串中指定了它。是否有必要在服务器上使用数据库身份验证?如果是这样,任何人都能告诉我为什么数据库身份验证无法在服务器上连接(根据第一条错误消息)?我做错了吗?有没有更简单的方法?如果你知道怎么做,我会非常感谢一些简单的步骤,因为我对此非常陌生。非常感谢。

    其他信息:

    本地系统:Windows 7。

    远程系统:Windows Server 2012,IIS 8.

    Web Matrix 3

0 个答案:

没有答案