This project has moved and is read-only. For the latest updates, please go here.

Deploy Error: web.config is missing/invalid

Topics: Developer Forum, User Forum
Mar 2, 2009 at 6:55 PM
I built sharepointlearningkit.wsp and went through the directions in the readme file for deployment.  From the CA server, I run addsolution and deploysolution and I see DeploymentFailedFileCopy when I run enumsolutions, there is nothing in the log files / event log relating to this.  I retract/delete and run addsolution again, go into Central Admin, and deploy the solution through the GUI and I get additional details.

Last Operation Result: Some of the files failed to copy during deployment of the solution.
Last Operation Details: WFESVR : http://caserver/ : The solution was successfully deployed. 
INDEXINGSVR : http://caserver/ : OurDevURL : Error: The web.config is invalid on this IIS Web Site: C:\Inetpub\wwwroot\wss\VirtualDirectories\OurDevURL80\web.config. 

CASVR : http://caserver/ : OurDevURL : Error: The web.config is missing from this IIS Web Site: C:\Inetpub\wwwroot\wss\VirtualDirectories\OurDevURL80\web.config.

The IIS settings for each site have the path set to d:\xxxx\VirtualDirectories\80\ so I'm confused where the c:\inetpub reference is coming from.  The path doesn't exist on the indexing server, it exists with data on the WFE, and it exists without data on the CA server.  If I rename web.config on the WFE under c:\inetpub\ it replaces the successful line with a "web.config is missing" line.

Any chance the solution assumes a path under c:\inetpub\wwwroot\wss\virtualdirectories\?
Mar 2, 2009 at 7:43 PM
I did some more spelunking in our implementation of SharePoint and uncovered the likely culprit, but I'm still not sure how to resolve.

In the SP configuration database there is a table called objects.  Within that table is a record that has the following substring:

<sFld type="String" name="m_ServerComment">OurDevURL</sFld><sFld type="String" name="m_Path">C:\Inetpub\wwwroot\wss\VirtualDirectories\OurDevURL80</sFld>

I can't find this anywhere in Central Admin.  Is there a way to change this through something other than IIS?  I get the feeling that somebody somewhere changed it in IIS but not in SharePoint (we have a rule to leave IIS alone but I can't think of any other reason for this).


Mar 2, 2009 at 8:31 PM
There's in the code which assumes c:\inetpub, so I think that you've hit the nail on the head with your second post. The only place I can find to change the web site location is in Create or Extend Web Application.

I'd be wary of making any changes to a production server. I've heard that you can delete a web application (choosing to not delete the content database) and then create a new one with the same name and re-use the content database (, but I've no idea if that would actually work.

If it was a dev server, I'd probably just delete it and start from scratch, but your probably not that lucky.

SLK Co-ordinator
Mar 3, 2009 at 1:04 PM
Happy to say that the problem is resolved.  The server team had applied some patches in dev that required them to remove/restore a web application on the WFE.  When they did that, it added a second IIS file path to the SharePoint properties for that app.

I'm not entirely thrilled about the fix (seems dirty).  I wrote a quick console app (based on input from a recent blog entry at that reset the path.  It appears to work and the solution deployed without errors.

Thanks for your feedback.