I'm trying to deploy a selection of pages and master pages in modules but I'm encountering the same problem with all of them.
When I try to navigate to a page, I get a File Not Found error (with unfortunately no information in ULS), but when I view the site in Designer, the files are there in the places I expected. In addition, the master pages show up in the Master Pages section of Site Settings, but when I set the master page on my site and navigate to default.aspx, I get file not found errors again.
I can see that the files have been deployed properly, but why are they not being served?
Here's the markup I've got in my module element files:
<Module Name="MyWebPages" Url="SitePages"> <File Path="MyWebPages\Page1.aspx" Url="Page1.aspx" Type="GhostableInLibrary" /> </Module>
<Module Name="MasterPage" List="116" Url="_catalogs/masterpage"> <File Path="MasterPage\MyMasterPage.master" Url="MyMasterPage.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" /> </Module>
Update I've redeployed the pages module, which seems to be working now, but still no luck with the master page.
Update 2 Added the new master page Elements.xml file. The strange thing is that the master page has deployed fine in the past, but I'm now I'm on a new site, it's failing.
Update 3 Added Falak's suggestions