Page error when

Apr 12, 2013 at 9:47 AM
Hello

I create a site with the MiniCalendar Web Part on the default page and convert this site into template.

When I try to create a new site with my template creted below I have an error on se page.
The error is : [FileNotFoundException: <nativehr>0x80070002</nativehr><nativestack></nativestack>]
Microsoft.SharePoint.Library.SPRequestInternalClass.GetWebUrl(Guid gWebId, String bstrSiteUrl) +0
Microsoft.SharePoint.Library.SPRequest.GetWebUrl(Guid gWebId, String bstrSiteUrl) +157
Microsoft.SharePoint.SPSite.OpenWeb(Guid gWebId, Int32 mondoHint) +180
Microsoft.SharePoint.SPSite.OpenWeb(Guid gWebId) +34
CalendarWebpart.CalendarWebpart.get_CalendarWeb() +130
CalendarWebpart.CalendarWebpart.cal_DataBinding(Object sender, EventArgs e) +517
System.Web.UI.Control.OnDataBinding(EventArgs e) +132
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +170
CalendarWebpart.CalendarWebpart.CreateChildControls() +631
System.Web.UI.Control.EnsureChildControls() +146
System.Web.UI.Control.PreRenderRecursiveInternal() +61
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394

Because I don't achieve to package a proper wsp I can't debug the project to find the problem and do a patch. (I am on VS2010)

Best regards

Phil
Coordinator
Apr 12, 2013 at 9:53 AM
It is normal to get this error when you create a new site from the template, because you configured the webpart to point to a specific web and list instances.
If you want to create a site template from a site that has the webpart added in a page, you should leave the webpart unconfigured before creating the site template (this way it will not reference specific web and list instances).
Apr 12, 2013 at 12:14 PM
Ok. I undersant the error now.

Thanks for the response

Best Regards
Phil