Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am getting the following error when saving a site as a template (just this specific site is having this issue - other sites in collection successfully save as template)

System.InvalidOperationException: Error generating solution files in temporary directory.
at Microsoft.SharePoint.SPSolutionExporter.ExportWebAsSolution()
at Microsoft.SharePoint.SPSolutionExporter.ExportWebToGallery(SPWeb web, String solutionFileName, String title, String description, ExportMode exportMode, Boolean includeContent, String workflowTemplateName, String destinationListUrl)
at Microsoft.SharePoint.SPSolutionExporter.ExportWebToGallery(SPWeb web, String solutionFileName, String title, String description, ExportMode exportMode, Boolean includeContent)
at Microsoft.SharePoint.ApplicationPages.SaveAsTemplatePage.BtnSaveAsTemplate_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

update Error reported on the ULS

12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation General g3qg Verbose fullOrRelativeUrl = http://URLmodified.test.com/CDC/SitePages/View test.aspx 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation General g3qh Verbose Site.Url = http://URLmodified.test.com 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation General g3qj Verbose url is in site 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring b4ly Verbose Leaving Monitored Scope (GetWebPartPageContent#99). Execution Time=14.1515192573358 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring nass Verbose __SQL Query Count=1 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring nass Verbose _Execution Time=14.1515192573358 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring nasq Verbose Entering monitored scope (Add WebParts) 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring nasq Verbose Entering monitored scope (Add WebPart with error) 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Database tkeb Verbose Setting database session for {89d93041-8e32-4fa1-9a97-93204642bdf4}. 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Database tzku Verbose ConnectionString: 'Data Source=SampleDBServer;Initial Catalog=SampleDB;Integrated Security=True;Enlist=False;Asynchronous Processing=False;Connect Timeout=15' ConnectionState: Closed ConnectionTimeout: 15 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring b4ly Verbose Leaving Monitored Scope (PSM BSO). Execution Time=7.48754380794207 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring nass Verbose _SQL Query Count=1 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring nass Verbose _SPRequest Objects=0 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring nass Verbose _Execution Time=7.48754380794207 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring nasq Verbose Entering monitored scope (Add WebPart with error) 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring b4ly Verbose Leaving Monitored Scope (PSM BSO (1)). Execution Time=3.46608297982006 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring nass Verbose _SQL Query Count=0 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring nass Verbose _SPRequest Objects=0 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring nass Verbose _Execution Time=3.46608297982006 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring b4ly Verbose Leaving Monitored Scope (Add WebParts#99). Execution Time=11.1882934842277 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation Monitoring nass Verbose ___Execution Time=11.1882934842277 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.79 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation General narq Verbose Releasing SPRequest with allocation Id {B62DDECF-8CC1-4312-A3C0-820918E91563} 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.80 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation General c42u Monitorable SPSolutionExporter: System.Xml.XmlException: An error occurred while parsing EntityName. Line 1, position 2925. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ParseEntityName() at System.Xml.XmlTextReaderImpl.ParseEntityReference() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlReader.ReadString() at Microsoft.SharePoint.WebPartPages.DataFormWebPart.get_DataFields() at T_DataFormWebPart_DataFields_65.GetProperty(Object ) at System.Web.UI.WebControls.WebParts.PersonalizableAttribute.GetPersonalizablePropertyValues(Control control, PersonalizationScope scope, Boolean excludeSensitive) at System.Web.UI.WebControls.WebParts.WebPartManager.ExportWebPart(WebPart webPart, XmlWriter writer) at Microsoft.SharePoint.WebPartPages.SPWebPartManager.ExportWebPartInternal(WebPart webPart, XmlWriter writer) at Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager.ExportWebPart(WebPart webPart, XmlWriter writer) at Microsoft.SharePoint.SPSolutionExporter.GetFilesInFolderTree(SPFolder folder, SortedList2 filesInFolder, List1 webViews) at Microsoft.SharePoint.SPSolutionExporter.GetFilesInFolderTree(SPFolder folder, SortedList2 filesInFolder, List1 webViews) at Microsoft.SharePoint.SPSolutionExporter.GetFilesInWeb(String workflowTemplateName) at Microsoft.SharePoint.SPSolutionExporter.GenerateSolutionFiles() at Microsoft.SharePoint.SPSolutionExporter.ExportWebAsSolution() 1ce906ef-a0b5-4769-8f87-28527757ebd7 12/05/2011 09:18:02.80 w3wp.exe (0x1EB4) 0x0BA8 SharePoint Foundation General 8hc6 Verbose Deleting temporary directory 'C:\Users\systemaccount\AppData\Local\Temp\SPSolutionExporter-68ff1eb4-e5ec-4475-b16b-4534211d86cf' and its contents during execution of the Dispose method. 1ce906ef-a0b5-4769-8f87-28527757ebd7

share|improve this question
    
it is not a permission issue. –  Karthikeyan Dec 4 '11 at 16:22
    
Saving with or without content? –  James Love Dec 4 '11 at 16:40
    
have not tried without content, will keep updated. –  Karthikeyan Dec 4 '11 at 17:19
    
What features are activated within the site? –  Mike Oryszak Dec 4 '11 at 17:39
    
Is this a migrated site from SP2007? –  Amit Kumawat Dec 5 '11 at 8:47
show 4 more comments

2 Answers

up vote 1 down vote accepted
+50

Did you try the solution in this TechNet post ?

Also try giving the APP Pool account access to the c:\windows\temp directory.

share|improve this answer
    
Is there any DataForm webpart in the site which is doing large XSL transformation? –  Deepu Nair Dec 5 '11 at 11:27
    
Nice to hear that... I believe your farm has been recently upgraded to SP1 and this might be causing the issue. This is a known issue. Check this post where the third solution might permanently remove your problem. support.microsoft.com/kb/2639184 –  Deepu Nair Dec 5 '11 at 12:33
    
Thanks for your help. –  Karthikeyan Dec 5 '11 at 12:54
add comment

SharePoint does many things while saving the site as template; its a long and complex operation. As Deepu suggested, check the access to the temp directory. But you already same operation for other web is working fine (assuming you are trying to save from same machine and save to same directory), so that possibility can be eliminated.

In almost all situations an actual exception message would be logged in ULS logs before InvalidOperationException is thrown.

I suggest you to go to Diagnostic Logging in central admin and enable Verbose trace logging for "SharePoint Foundation -> General" and then watch (I recommend using ULS Viewer Tool) what's going on after you try to save as template and before the error appears.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.