部署WEB应用程序

部署WEB应用程序:

1.在模板机上新建IIS站点

2.安装WebDeploy后在IIS控制台中导出站点为应用程序包

其站点在新虚机上必须存在,否则会报错,如下:

应用程序(C:\ProgramData\VirtualMachineManagerData\CacheResources\671f29283e96463fba29bc6586d31133\Site02_NoApp.zip、WebDeploy)安装操作在虚拟机(SERVICEVM00002)上失败。DetailedErrorMessage: Site 'Site02' does not exist.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SITE_DOES_NOT_EXIST.。有关更多详细信息,请参阅虚拟机上的事件日志文件(C:\Program Files\Microsoft System Center Virtual Machine Manager 2012 Guest Agent\bin\Diagnostics\VmmGuestLog.svclog)。

3.将应用程序包导入到库中

4.新建应用程序配置文件:
  脚本: cmd.exe 参数:/q /c InstallWebDeploy.cmd
  浏览添加Web应用程序包、脚本资源包

===================================================

Web Deploy error codes

By Bilal Aslam

April 12, 2011

For certain common error cases, Web Deploy will show an error code. This table explains why the error occurs and steps the user can take to avoid the error. Note that the error message may be different depending on how Web Deploy is invoked e.g. Microsoft WebMatrix chooses to show custom error messages. The error messages listed below show up on the msdeploy.exe command line and API:

MySqlDumpNotFound
Diagnosis - Web Deploy cannot find the mysqldump.exe executable. This executable is required for MySQL database deployments.
Resolution - There are two workarounds:
  1. Place the executable in C:\Program Files\MySQL\MySQL Server 5.1\bin
  2. Set a REG_SZ registry key to point to the executable: e.g. (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\2\MySqlDumpPath is set to "c:\mysqldump\mysqldump.exe"
RemoteAppNotFound
Diagnosis - The remote application could not be found. This can happen if you try to do a dump of "remotesite/remoteapp" where "remoteapp" does not actually exist
Resolution - Specify a remote application name that actually exists
FileOrFolderNotFound
Diagnosis - This can happen if you try to do a SetAcl on a file or folder that does not exist.
Resolution - Specify a file or folder that exists.
ERROR_DESTINATION_INVALID
Diagnosis - Computer name is mistyped, or the computer is not reachable.
Resolution - Try to check if the computername is valid. Try pinging the computer manually.
ERROR_DESTINATION_NOT_REACHABLE
Diagnosis - Web Management Service or Remote Agent is not installed or unreachable on the remote computer.
Resolution - Verify that Remote Agent Service or Web Management Service are started on the remote computer, depending on which one you are connecting to. You can do a "net start wmsvc & net start msdepsvc" on the remote computer to ensure these services are started. Also, ensure that a firewall is not interrupting communications with the destination.
ERROR_USER_UNAUTHORIZED
Diagnosis - This error code can surface because of a number of different reasons. It typically indicates an authentication or authorization problem, and can happen because of any of thee following reasons:
  • User does not exist
  • User does not have IIS Manager access to site if connecting using Web Management Service
  • Site does not exist
  • Password is incorrect
Resolution - If connecting using the Web Management Service:
  • Verify that the username and password are correct
  • Verify that the site exists
  • Verify that the user has IIS Manager Permissions to the site's scope

Resolution - If connecting using the Remote Agent Service:

  • Verify that the username and password are correct
  • Verify that the user account you specified is a member of the Administrators group on the remote computer. NOTE: If you are not using the built-in administrator, create a new group called the "MSDepSvcUsers" group and add your new administrator to that group.
  • Verify that the site exists
ERROR_USER_NOT_ADMIN
Diagnosis - This happens if you try to connect to the Remote Agent Service but have not provided appropriate administrator credentials.
Resolution - The Remote Agent Service accepts either built-in Administrator or Domain Administrator credentials. If you have a non-domain setup and want to use account other that built-in administrator, please do following:
  • Create a separate user group MSDepSvcUsers on remote computer.
  • Create an local account A on both local & remote computer.
  • Add A to MSDepSvcUsers on remote computer.
  • Use account A to publish, this will allow you to publish without needing to use built-in admin account.
ERROR_CERTIFICATE_VALIDATION_FAILED
Diagnosis - The certificate presented by the Web Deploy endpoint is untrusted or invalid. This typically happens if the remote server has a self-signed certificate for the Remote Agent Service or the Web Management Service.
Resolution - Either install a trusted certificate on the endpoint, or try bypassing certificate validation.
  • From the msdeploy.exe command line, you can do this by passing the -allowUntrusted flag.
  • From the Visual Studio 2010 publish UI, you can check "Allow untrusted"
  • From a Visual Studio 2010 deployment package (e.g. MyApp.deploy.cmd), you can pass the -allowUntrusted flag
ERROR_PROXY_GATEWAY
Diagnosis - A proxy gateway is preventing Web Deploy from communicating with the remote Web Deploy endpoint.
Resolution - Web Deploy does not read system proxy settings. As a workaround, try disabling the system proxy:
  • Start Internet Explorer
  • Click Tools > Options
  • Click Connection
  • Click LAN Settings
  • Disable all checkboxes
ERROR_SITE_DOES_NOT_EXIST
Diagnosis - Specified IIS site does not exist.
Resolution - Verify that the specified site actually exists.
In some cases you may get this error if you have specified "/" instead of "\" in site URL, . Try changing "/" to "\".
ERROR_APP_DOES_NOT_EXIST
Diagnosis - The specified application does not exist in IIS.
Resolution - Check IIS Manager to make sure you have correctly specified the name of the application path.
ERROR_USER_NOT_AUTHORIZED_FOR_IISAPP,
ERROR_USER_NOT_AUTHORIZED_FOR_DBFULLSQL,
ERROR_USER_NOT_AUTHORIZED_FOR_DBMYSQL,
ERROR_USER_NOT_AUTHORIZED_FOR_SETACL,
ERROR_USER_NOT_AUTHORIZED_FOR_APPPOOLNETFX,
ERROR_USER_NOT_AUTHORIZED_FOR_APPPOOLPIPELINE,
ERROR_USER_NOT_AUTHORIZED_FOR_RECYCLEAPP,
ERROR_USER_NOT_AUTHORIZED_FOR_CREATEAPP,
ERROR_USER_NOT_AUTHORIZED_FOR_CONTENTPATH
Diagnosis - A non-administrative user attempted to perform an operation with a Web Deploy provider for which the user is not currently authorized.
Resolution - Web Deploy 2.0 setup, by default, creates Management Service Delegation Rules which allow non-administrators to perform operations with this provider. It is possible that a delegation rule required for this provider has not been setup correctly.

Workaround: From the Programs Control Panel, run Repair on Web Deploy 2.0. Alternatively, create the delegation rule manually.

ERROR_USER_NOT_AUTHORIZED_FOR_DEPLOYMENTPROVIDER
Diagnosis - A non-administrative user attempted to perform an operation with a Web Deploy provider for which the user is not currently authorized. This error code surfaces if the user attempts to perform an operation with a provider for which Web Deploy 2.0's setup does not create a delegation rule.
Resolution - Web Deploy 2.0 setup does not create a delegation rule for this provider. Create the delegation rule manually.
ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER
Diagnosis - This error code can surface if connecting over the Web Management Service as a non-administrator:
  • If connecting using IIS Manager credentials, the Web Management Service's identity (typically Local Service) needs Full Control permissions on the site's root folder to be able to create files and folders underneath.
  • If connecting using Windows credentials, the Windows user needs Full Control over the site's root folder to be able to create files and folders underneath.
Resolution - Grant the appropriate account Full Control on the site's root folder. Alternatively:
  • Start IIS Manger and right click on the site in question
  • Click Deploy > Configure for Web Deploy Publishing
  • Select the appropriate username
  • Click Setup
ERROR_INSUFFICIENT_ACCESS_TO_APPHOSTCONFIG
Diagnosis - The RunAs identity specified for the createApp delegation rule needs Write access to the IIS server's applicationHost.config file.
Resolution - Grant the RunAs identity of the createApp delegation rule Write access to the IIS server's applicationHost.config file.
ERROR_INVALID_CONNECTION_STRING
Diagnosis - An invalid database connection string was specified which caused a dbFullSql or dbMySql provider to not run correctly. This can happen if a connection string is malformed (e.g. Sevver=localhost;...) or if the connection string contains keys which the target database server does not recognize.
Resolution - Verify that the connection string is valid.
ERROR_SQL_EXECUTION_FAILURE
Diagnosis - A SQL script execution failure occurred. This can happen for a va
Resolution - This can happen for a number of reasons. Please read more here.
ERROR_TYPE_NOT_FOUND_IN_ASSEMBLY
Diagnosis - dbFullSql provider of Web Deploy requires Server Management Objects version 10 or higher.
Resolution - The SQL provider cannot run because of a missing dependency. Please make sure that Microsoft SQL Server Management Objects (Version 10 or higher) is installed.
ERROR_OBJECT_TO_BE_DELETED_DOES_NOT_EXIST
Diagnosis - Web Deploy originally found an object to be deleted but when it tried to delete it, it was missing.
Resolution - Make sure there are no other external processes that are modifying the target while doing a sync.
ERROR_APPPOOL_VERSION_MISMATCH
Diagnosis - The source application pool version is different from the destination application pool version.
Resolution - You can manually change the application pool versions to match between the source and destination, or use the apppoolnetfx provider to do it automatically.
ERROR_CENTRAL_CERT_STORE_SETTINGS_CANNOT_BE_READ
Diagnosis - The central certificate store cannot be used in your current configuration.
Resolution - You need to make sure that you are using IIS 8 or later. If you are running msdeploy.exe on a 64-bit server, make sure that you are using the 64-bit version of the executable.
ERROR_CENTRAL_CERT_STORE_NOT_CONFIGURED_PROPERLY
Diagnosis – The Centralized SSL Certificate Store is either not installed or setup properly. This feature is also not supported on IIS 7.5 or earlier.
Resolution – Verify that the server you are syncing to/from is running IIS 8 or later. Also verify that the Centralized SSL Certificate Store is installed and configured on that server.
ERROR_MISSING_REQUIRED_DEPENDENCIES
Diagnosis – The AppHostAuthOverride provider requires IIS7 or later.
Resolution – Make sure that the destination server you are modifying is running IIS7 or later.
ERROR_COULD_NOT_CONNECT_TO_REMOTESVC
Diagnosis - Web Deploy cannot connect to the remote service.
Resolution - Ensure that:
  1. You can ping the remote machine
  2. That the msdepsvc or wmsvc service is started on the remote server.
  3. Your firewall is not blocking incoming connections of your ports on the destination. If you used the default installation, then it would be 80 for msdepsvc and 8172 for wmsvc.
ERROR_FRAMEWORK_VERSIONS_DO_NOT_MATCH
Diagnosis - This can occur if you are doing a web server sync between two machines that have different versions of .Net installed.
Resolution - By default, Web Deploy will favor running in the version of .Net that is specified in its configuration file. If the version of .Net that Web Deploy is using on the client is different from the version on the server, we will block a Web Server sync to prevent settings from different versions of .Net from being migrated. To get around this, you have two options:
  1. Use the netFxVersion provider setting to tell Web Deploy exactly which .Net settings to migrate. Here is a command line example which forces Web Deploy to sync .Net 2.0 settings:

    msdeploy.exe -verb:sync -source:webserver,machineconfig32.netfxversion=2,machineconfig64.netfxversion=2,rootwebconfig32.netfxversion=2,rootwebconfig64.netfxversion=2 -dest:webserver,machineconfig32.netfxversion=2,machineconfig64.netfxversion=2,rootwebconfig32.netfxversion=2,rootwebconfig64.netfxversion=2,computername=destServername

  2. Run Web Deploy in the same version of .Net between client and server. On the client side, you can change the ordering of the supportedRuntime version element in the "%programfiles%\IIS\Microsoft Web Deploy V3\msdeploy.exe.config" file for the version of .Net that is specified first (see gacInstall provider for an example of this). This will indicate the version of .Net that will be loaded, assuming it is installed on your system. On the server side, you can do the same for "%programfiles%\IIS\microsoft web deploy\msdepsvc.exe.config". If you modify this file, make sure to restart the Web Deployment Agent Service (net stop msdepsvc & net start msdepsvc).
ERROR_HTTPCERT_BINDING_NOT_FOUND
Diagnosis - The specified binding could not be found.
Resolution - Run "netsh http show sslcert" from the command line to verify that the specified binding exists. If it is not found, then you may need to recreate it through IIS Manager.
ERROR_INCORRECT_PARAMETER_TAG
Diagnosis - An incorrect parameter tag was passed.
Resolution - Rerun msdeploy with the tag SQL, SQLCE, or MYSQL.
ERROR_INVALID_PATH
Diagnosis - The provider path is invalid.
Resolution - Depending on the provider you are using, the required path for your provider may be different. Visit http://technet.microsoft.com/en-us/library/dd569040(WS.10).aspx to find out more about the provider you are using.
ERROR_INVALID_SETTING_SPECIFIED
Diagnosis - The provider setting specified is invalid.
Resolution - Visit Technet to find out more about the provider you are using.
ERROR_INVALID_SETTING_VALUE_SPECIFIED
Diagnosis - The provider setting value is invalid.
Resolution - Visit Technet to find out more about the provider you are using.
ERROR_SNI_BINDINGS_NOT_SUPPORTED
Diagnosis - SNI Bindings are only supported on IIS 8 or later.
Resolution - SNI Bindings can only be created on IIS 8 or later.
ERROR_FAILED_TO_RESTORE_BACKUP
Diagnosis – Web Deploy was unable to restore a backup.
Resolution – Verify that:
  1. The backup specified exists on the server.
  2. If there is a database within the backup, that a connection string is specified in the connection string provider setting.
ERROR_BACKUPS_ARE_NOT_CONFIGURED_PROPERLY
Diagnosis – The backup feature is not configured properly on the destination server.
Resolution – Check the event logs for hints on which settings are misconfigured. Validate that the settings stored in the applicationHost.config file conform to the IIS schema file BackupManagerSchema.xml.
ERROR_CANNOT_CREATE_BACKUP
Diagnosis – Web Deploy failed to create a new backup on the destination server.
Resolution – Verify that:
  1. If you are doing an appHostConfig provider sync, that the path for the provider is not empty.
  2. If there are multiple providers in a manifest that take in virtual paths, ensure that all paths point to the same application.
  3. If you are performing a manual backup, ensure that the feature is “turned on” in the server backup settings.
  4. Check the server event logs if the error message returned to the client does not contain enough information.
ERROR_SETTING_IS_READ_ONLY
Diagnosis – The backup setting that you are trying to set is marked as read only and cannot be set.
Resolution – The server administrator needs to mark the backup setting as “settable” in the applicationHost.config file by either manually updating the file, or by using Web Deploy’s PowerShell scripts.
ERROR_FILE_IN_USE
Diagnosis – A destination file cannot be overwritten or deleted because it is currently in use.
Resolution – Make sure that the destination file is not in use before performing a sync. If you are syncing content to a web site hosted on IIS 7 or later (using the appHostConfig, iisApp, or contentPath providers), consider taking the application offline during the sync by enabling the appOffline rule.
ERROR_FAILED_TO_BRING_APP_ONLINE
Diagnosis – Web Deploy was not able to remove the app_offline.htm file from the site after the sync completed.
Resolution – You may either rerun the sync with the appOffline rule enabled, or manually delete the app_offline.htm file from the root of your site on the destination server. For details on the reason for the failure, check the server event logs.
ERROR_HIGHER_FXVERSION_REQUIRED
Diagnosis – Web Deploy failed to perform a sync using SQL Dedicated Administrator Connection (DAC) because SQL DAC requires .Net 4.0.
Resolution – Ensure that the server making the SQL connection using DAC has .Net 4.0 installed. If you are connecting using the msdeploy.exe client, ensure that it has .Net 4.0 listed as its first option in the msdeploy.exe.config file. If you are connecting to the msdepsvc server endpoint (Web Deployment Agent service), ensure that it has .Net 4.0 listed as its first option in the msdepsvc.exe.config file.
ERROR_MAX_NUM_APPLICATIONS_EXCEEDED
Diagnosis – You have created more web applications than allowed on the target server.
Resolution – Request more applications from your server administrator or delete some of your existing applications.
ERROR_API_NOT_SUPPORTED
Diagnosis – The API being called does not exist on the target server because the server is using an earlier version of Web Deploy.
Resolution – Install the latest version of Web Deploy on the server.
DacFxNeededForSQLProvider,
ERROR_SCRIPTDOM_NEEDED_FOR_SQL_PROVIDER,
ERROR_SQLCLRTYPES_NEEDED_FOR_SQL_PROVIDER
Diagnosis – SQL DAC and its dependencies are not installed.
Resolution – Use Web Platform Installer to install:
  1. Microsoft SQL Server 2012 Data-Tier Application Framework
  2. SQL Server 2012 Transact-SQL ScriptDom
  3. SQL Server System CLR Types 11.0
ERROR_PACKAGE_TOO_LARGE
Diagnosis – The package or backup being created exceeds the maximum size of 4GB.
Resolution - Use the archiveDir provider when creating a package instead. Currently there is no solution for this limit with respect to automatic backups.
ERROR_TIMED_OUT
Diagnosis - MySqlDump took too long to respond to a given query.
Resolution - You can change how long Web Deploy waits for MySqlDump to return from a query by changing the value of the WaitAttemptsSettingInfo and WaitIntervalSettingInfo provider settings.
ERROR_ASSEMBLY_NOT_FOUND
Diagnosis - Required dependencies could not be loaded.
Resolution - If you installed Web Deploy manually through the MSI, try reinstall using Web Platform Installer to install Web Deploy, which will help to install required dependencies for you.
ERROR_SMO_NEEDED_FOR_SQL_PROVIDER,
ERROR_USER_NOT_AUTHORIZED_FOR_IISAPP,
ERROR_SCRIPTER_NEEDED_FOR_SQLCE_PROVIDER
Diagnosis - SQL Shared Management Objects (SMO) was not found or the installed version is too old.
Resolution - Install the latest version of SMO using Web Platform Installer.
ERROR_CANNOT_CONNECT_TO_DATABASE
Diagnosis - Could not connect to a database.
Resolution - Verify that:
  1. Your connection string is correct.
  2. The account specified in the connection string has access to the database.
  3. The database server you are connecting to allows remote connections.
  4. The database server can be accessed from the machine running Web Deploy. If you are connecting to a remote Web Deploy server and specified a database, then you need to make sure that the remote Web Deploy server has access to your database.
ERROR_DACPAC_EXTRACTION_TIMEDOUT
Diagnosis - The DAC PAC action took too long to complete.

Resolution - Increase the amount of time that Web Deploy waits for a command to complete by specifying the CommandTimeout provider setting.

FROM:http://www.iis.net/learn/publish/troubleshooting-web-deploy/web-deploy-error-codes#ERROR_SITE_DOES_NOT_EXIST

上一篇:QString的arg方法


下一篇:JS实现精确加减乘除