Solved

msdeploy syncing issues

Posted on 2013-01-21
1
1,147 Views
Last Modified: 2013-01-22
I have 4 Windows 2008 R2 servers. 3 are IIS 7.5 web servers and 1 is a sql server / shared file server. I configured the first web server exactly as I wanted it, then used this msdeploy command to sync the config to the other 2 web servers.

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

Open in new window


That successfully pushed the config to the other web servers. They work except they are unable to connect to the virtual directories I've setup. If I run the sync a second time, you can see that it says it's skipping the virtual directories (even though it actually does create them on the target machine)

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)

Open in new window


I need to get the other two server so that they are are able to connect to the virtual directories. I've tried re-entering the credentials for the virtual directory, deleting the virtual directory and setting it up manually, deleting the whole site and setting it up manually. All of those things fail. It's almost like msdeploy broke my IIS installation. I've run a compare on the site directory on the systems and they are identical. I've compared c:\Windows\System32\inetsrv\config\applicationHost.config and they are identical with the exception of the hashed passwords for the virtual directories.

The IIS installations say they have the same role services installed.

The biggest clue I have to solving this is the application error log. The two server that are not working throw this warning message when they compile the site. It's looking for a web.config in the virtual directory. That leads me to believe it thinks the virtual directory is actually an application. Nowhere do I see that in the configuration settings.

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.xx 
    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)

Open in new window


Thanks for your help in troubleshooting this.
0
Comment
Question by:beapit
1 Comment
 

Accepted Solution

by:
beapit earned 0 total points
ID: 38805877
I fixed this myself. MSDeploy totally screwed up the target IIS install. I ran file comparisons and everything was identical between the source and target but I was still having the issue. I uninstalled and reinstalled IIS. That got IIS working again. Then I found the article below about the -disableLink option. -disableLink:ContentExtension tells it to not sync virtual directories. That switch wins the "not obvious" award...

http://www.asp.net/web-forms/tutorials/deployment/web-deployment-in-the-enterprise/deploying-web-packages
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

Here are the symptoms: You start receiving calls from users that one of your legacy web apps isn't coming up, so you log into your IIS 5 server to check it out.  When you pull up the services, you notice that the WWW Publishing service isn't runn…
Lync server 2013 Backup Service Error ID 4049 – After File Share Migration
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now