Is there any chance to achieve this? The sharepoint project and the silverlight web part, which is called by the aspx, are linked by this template. I played with module and feature xml files but i couldn't manage to deploy the aspx to subsite.

unedited version of elements.xml of the module:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="SitePages">
    <File Path="SitePages\VisitorTracking.WebPartWebPartPage.aspx" Url="SitePages/VisitorTracking.WebPartWebPartPage.aspx" Type="GhostableInLibrary"/>
  • Have you added the aspx file to your module, aswell as add that module to a feature? That's what I did to get my site template working. Might be stupid questions but I just wanted to make sure that I understand what you've done so far.
    – K.W
    Commented Feb 9, 2012 at 9:41
  • I have added both of them. It deploys the aspx to site collection site pages library with the default elements.xml above.
    – onatm
    Commented Feb 9, 2012 at 9:45

1 Answer 1


Where are you storing this aspx file ? Mostly, aspx files are stored in the layouts folder, although they can also be stored in pages (or any other) libraries.

If you want it to go into _layouts folder, nothing has to be done for subsites.

If you want it to be stored in a library on subsite level, please provide the elements.xml file from your module. This way we can check what might be going wrong.

This is what my module looks like:

 <Module Name="MasterPage" Url="_catalogs/masterpage" RootWebOnly="TRUE">
    <File Path="MasterPage\bekaert.blue.master" Url="bekaert.blue.master" Type="GhostableInLibrary">
      <Property Name="ContentType" Value="$Resources:cmscore,contenttype_masterpage_name;" />
      <Property Name="UIVersion" Value="4" />

So the Url property of the Module will be the List to where u need to provision. The Path property of the File is the location in your solution. The Url property of the file is the location to store it. (in my example it will be in the root of masterpage libary, if you want it to be in a subfolder u can use: Url="subFolder/..." for the File Url property)

So for sitepages this Module Url should be "SitePages":



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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