I have created a visual web part through visual studio 2010 and it works nicely when I add it to web part page.
I now want to create a custom application page to consume my web part.
I created a new application page called SRPMain.aspx and the solution created it under "Layouts/Certco.SRPWebPart/SRPMain.asxp". This I understand.
I then converted the application page to a web part page by including a web part zone.
I then created a module to be able to deploy the web part part page:
<?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Module Name="SRPModule" > <File IgnoreIfAlreadyExists ="True" Url="SRPMain.aspx" Name="SRPMain.aspx" Type="Ghostable" Path="_layouts\Certco.SRPWebPart\SRPMain.aspx"/> </Module>
When trying to deploy it through a feature I get this error:
Error 3 Error occurred in deployment step 'Activate Features': Failed to instantiate file "SRPMain.aspx" from module "SRPModule": Source path "Features\Certco.SRPWebPart_Feature1\_layouts\Certco.SRPWebPart\SRPMain.aspx" not found. 0 0 Certco.SRPWebPart
It doesn't seem to be able to find the .aspx file to deploy through the feature. How do I resolve this?