I am a novice in sharepoint 2013.
I have created a Sharepoint 2013 Solution using "Empty Project" as my template and added two aspx pages.
When deploying the solution using VS2012 the solution gets deployed and worked perfectly. When I use powershell to deploy the solution on this same web application also it works as expected.
The problem arises when I deploy the solution using powershell on a different web application. It deploys perfectly but then I get page not found error even though I can see the aspx pages in the file system. If I deploy the solution using VS2012 on this same web application it works perfectly and then even if I use power shell in my subsequent attempts it works fine.
I am really stumped and have no clue as to where I am making a mistake.
What special does VS do while deploying the solution for the first time?
Below is my powershell script
Add-PSSnapin Microsoft.Sharepoint.Powershell
Import-Module WebAdministration
$webURL = read-host -prompt ‘Sharepoint Web Application URL (Eg: http://myurl.com):’;
$rootFilePath = read-host -prompt ‘Full File Path of wsp file (Eg: C:\Packages):’;
$wspFilePath = $rootFilePath + '\my.wsp'
$spWeb = Get-SPWeb -Identity $webURL
$pool = (Get-Item "IIS:\Sites\myapplication"| Select-Object applicationPool).applicationPool
Restart-WebAppPool $pool
write-host "App Pool resetted."
Add-SPSolution $wspFilePath -Confirm
Install-SPSolution -Identity my.wsp -GACDeployment -WebApplication $webURL -Force
write-host "Solution deployed."
The solution gets deployed perfectly but I am unable to browse my pages.