我有4个Windows 2008 R2服务器。 3是IIS 7.5 Web服务器,1是一个SQL服务器/共享文件服务器。 我完全按照需要configuration了第一台Web服务器,然后使用此msdeploy命令将configuration同步到其他两台Web服务器。
msdeploy -verb:sync -source:webserver,computername=http://www1.server.com:8080/MSDeploy -dest:webserver,computername=http://www2.server.com:8080/MSDeploy msdeploy -verb:sync -source:webserver,computername=http://www1.server.com:8080/MSDeploy -dest:webserver,computername=http://www3.server.com:8080/MSDeploy
这成功地将configuration推送到其他Web服务器。 他们工作,除了他们无法连接到我设置的虚拟目录。 如果我再次运行同步,则可以看到它表示正在跳过虚拟目录(即使它实际上是在目标机器上创build它们)
Info: Using ID 'd9baab2a-4798-4760-8e09-24558cf6edd4' for connections to the remote server. Info: Using ID 'e5389a2a-6925-425a-8d2c-fa8d8ae00727' for connections to the remote server. Warning: Skipping source dirPath (\\server\Upload) because of rule SkipInvalidSource. Could not find directory '\\server\Upload'. Warning: Skipping source dirPath (\\server\FileSystem) because of rule SkipInvalidSource. Could not find directory '\\server\FileSystem'. Warning: Skipping source dirPath (\\server\Configuration) because of rule SkipInvalidSource. Could not find directory '\\server\Configuration'. Warning: Skipping source dirPath (\\server\SharedContent) because of rule SkipInvalidSource. Could not find directory '\\server\SharedContent'. Info: Object configProtectedData (MSDeploy.webServer/webServer/appHostConfig[@path='']/location[@path='']/section[@name='configProtectedData']/configProtectedData) skipped due to skip directive 'ConfigProtectedData'. Info: Object configProtectedData (MSDeploy.webServer/webServer/machineConfig32[@path='/']/location[@path='']/configProtectedData) skipped due to skip directive 'ConfigProtectedData'. Info: Object configProtectedData (MSDeploy.webServer/webServer/machineConfig64[@path='/']/location[@path='']/configProtectedData) skipped due to skip directive 'ConfigProtectedData'. Info: Using ID '231d358c-292f-435d-8026-3158d8ed5c6b' for connections to the remote server. Warning: Skipping source dirPath (\\server\Upload) because of rule SkipInvalidSource. Could not find directory '\\serverl\Upload'. Warning: Skipping source dirPath (\\server\FileSystem) because of rule SkipInvalidSource. Could not find directory '\\serverl\FileSystem'. Warning: Skipping source dirPath (\\server\Configuration) because of rule SkipInvalidSource. Could not find directory '\\server\Configuration'. Warning: Skipping source dirPath (\\server\SharedContent) because of rule SkipInvalidSource. Could not find directory '\\server\SharedContent'. Info: Object configProtectedData (MSDeploy.webServer/webServer/appHostConfig[@path='']/location[@path='']/section[@name='configProtectedData']/configProtectedData) skipped due to skip directive 'ConfigProtectedData'. Info: Object configProtectedData (MSDeploy.webServer/webServer/machineConfig32[@path='/']/location[@path='']/configProtectedData) skipped due to skip directive 'ConfigProtectedData'. Info: Object configProtectedData (MSDeploy.webServer/webServer/machineConfig64[@path='/']/location[@path='']/configProtectedData) skipped due to skip directive 'ConfigProtectedData'. Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
我需要得到另外两台服务器,以便它们能够连接到虚拟目录。 我已经尝试重新input虚拟目录的凭据,删除虚拟目录并手动设置,删除整个站点并手动设置。 所有这些事情都失败了。 这几乎就像msdeploy打破了我的IIS安装。 我已经在系统上的站点目录上运行比较,它们是相同的。 我比较了c:\ Windows \ System32 \ inetsrv \ config \ applicationHost.config,它们与虚拟目录的哈希密码的例外是一致的。
IIS安装说他们安装了相同的angular色服务。
我必须解决的最大线索是应用程序错误日志。 两个不工作的服务器在编译站点时会抛出此警告消息。 它正在虚拟目录中寻找一个web.config。 这使我相信它认为虚拟目录实际上是一个应用程序。 无处不在configuration设置中看到。
Event code: 3008 Event message: A configuration error has occurred. Event time: 1/21/2013 4:28:46 PM Event time (UTC): 1/21/2013 9:28:46 PM Event ID: 036c3591338f4f84aaac84e68c4f7753 Event sequence: 35 Event occurrence: 1 Event detail code: 0 Application information: Application domain: /LM/W3SVC/1/ROOT-2-130032773103912852 Trust level: Full Application Virtual Path: / Application Path: D:\sites\server.com\ Machine name: S615516NJ3VW02 Process information: Process ID: 4136 Process name: w3wp.exe Account name: IIS APPPOOL\server.com Exception information: Exception type: ConfigurationErrorsException Exception message: An error occurred loading a configuration file: Failed to start monitoring changes to '\\server\Upload' because access is denied. (\\server\Upload\web.config) Request information: Request URL: http://www2.server.com/Upload/Flash/history.swf Request path: /Upload/Flash/history.swf User host address: xxx.xxx.xx.35 User: Is authenticated: False Authentication Type: Thread account name: IIS APPPOOL\server.com Thread information: Thread ID: 6 Thread account name: IIS APPPOOL\server.com Is impersonating: False Stack trace: at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal) at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission) at System.Configuration.BaseConfigurationRecord.GetSection(String configKey) at System.Web.Configuration.RuntimeConfig.GetSectionObject(String sectionName) at System.Web.Configuration.RuntimeConfig.GetSection(String sectionName, Type type, ResultsIndex index) at System.Web.Configuration.RuntimeConfig.get_Identity() at System.Web.HttpContext.SetImpersonationEnabled() at System.Web.HttpApplication.AssignContext(HttpContext context) at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
感谢您的帮助解决这个问题。
我自己解决这个问题。 MSDeploy完全搞砸了目标IIS安装。 我运行文件比较,源和目标之间的一切都是相同的,但我仍然有问题。 我卸载并重新安装了IIS。 这让IIS重新工作。 然后我find了关于-disableLink选项的文章。 -disableLink:ContentExtension指示它不同步虚拟目录。 那个开关赢得了“不明显的”奖
我的情况也许更简单:我把msdeploy命令放在错误的RDP窗口,应用程序试图传输数据到自己。
艰难的一周周五艰难。