title: new page in asp.net mvc website
body: <p>I am assigned to add a new page to existing website which is probably mvc1</p>
  
  <p>I copied contents of a page xyz.aspx and made new file xyz1.aspx in same folder</p>
  
  <p>mybasepath/home/xyz works fine but mybasepath/home/xyz1 does not</p>
  
  <p>I know asp.net mvc3,4. If there is a controller (cs file) having a method Index returning string.empty</p>
  
  <p>then we get a vaild url for that controller</p>
  
  <p>But this has no controller folder. All pages exist as root/views/home/xyz.aspx. None of both xyz and xyz1 contain and code behind c# file.</p>
  
  <p>What else i might have to do to make mybasepath/home/xyz1 working or even mybasepath/home/xyz_text.txt working</p>
  
  <p>None of the files contain any specific page names still i would share as per SO policy :)</p>
  
  <p><strong>Global.asax</strong></p>
  
  <pre><code>&lt;%@ Application Codebehind="Global.asax.cs" Inherits="MvcASPCart.MvcApplication" Language="C#" %&gt;
  </code></pre>
  
  <p><strong>Web.Config at root</strong></p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  
  &lt;configuration&gt;
  
    &lt;appSettings&gt;
  
    &lt;/appSettings&gt;
    &lt;system.web&gt;
  
      &lt;urlMappings enabled="true"&gt;
  
        &lt;add url="~/Reviews" mappedUrl="~/Home/Reviews" /&gt;
  
      &lt;/urlMappings&gt;
      &lt;sessionState mode="InProc" timeout="120"/&gt;
      &lt;customErrors mode="Off"/&gt;
  
      &lt;httpRuntime requestValidationMode="2.0" /&gt;
      &lt;compilation debug="false" targetFramework="4.0"&gt;
        &lt;assemblies&gt;
          &lt;add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;
          &lt;add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;
          &lt;add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;
          &lt;add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /&gt;
          &lt;add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;
          &lt;add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;
        &lt;/assemblies&gt;
      &lt;/compilation&gt;
  
      &lt;authentication mode="Forms"&gt;
        &lt;forms loginUrl="~/Account/LogOn" timeout="2880" /&gt;
      &lt;/authentication&gt;
  
      &lt;profile&gt;
        &lt;providers&gt;
          &lt;clear /&gt;
          &lt;add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ApplicationServices" applicationName="/" /&gt;
        &lt;/providers&gt;
      &lt;/profile&gt;
      &lt;roleManager enabled="false"&gt;
        &lt;providers&gt;
          &lt;clear /&gt;
          &lt;add connectionStringName="ApplicationServices" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /&gt;
          &lt;add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /&gt;
        &lt;/providers&gt;
      &lt;/roleManager&gt;
  
  
      &lt;pages validateRequest="false" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"&gt;
        &lt;namespaces&gt;
          &lt;add namespace="System.Web.Mvc" /&gt;
          &lt;add namespace="System.Web.Mvc.Ajax" /&gt;
          &lt;add namespace="System.Web.Mvc.Html" /&gt;
          &lt;add namespace="System.Web.Routing" /&gt;
          &lt;add namespace="System.Linq" /&gt;
          &lt;add namespace="System.Collections.Generic" /&gt;
          &lt;add namespace="System.Web.Helpers" /&gt;
          &lt;add namespace="System.Web.WebPages" /&gt;
        &lt;/namespaces&gt;
      &lt;/pages&gt;
    &lt;/system.web&gt;
  
    &lt;system.web.extensions /&gt;
  
    &lt;system.webServer&gt;
  
      &lt;modules runAllManagedModulesForAllRequests="true"&gt;
      &lt;/modules&gt;
      &lt;handlers&gt;
        &lt;remove name="UrlRoutingHandler" /&gt;
      &lt;/handlers&gt;
      &lt;httpProtocol&gt;
        &lt;customHeaders&gt;
          &lt;add name="X-UA-Compatible" value="IE=edge,chrome=1"/&gt;
        &lt;/customHeaders&gt;
      &lt;/httpProtocol&gt;
  
      &lt;rewrite&gt;
        &lt;rules&gt;
  
          &lt;clear /&gt;
          &lt;rule name="Redirect to wwww" stopProcessing="true"&gt;
            &lt;match url="(.*)" /&gt;
            &lt;conditions&gt;
              &lt;add input="{HTTP_HOST}" pattern="^xyz\.com.au$" /&gt;
            &lt;/conditions&gt;
            &lt;action type="Redirect" url="xyz.com/{R:1}" redirectType="Permanent" /&gt;
          &lt;/rule&gt;
  
  
        &lt;/rules&gt;
      &lt;/rewrite&gt;
  
    &lt;/system.webServer&gt;
  
    &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /&gt;
          &lt;bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
    &lt;system.net&gt;
      &lt;mailSettings&gt;
        &lt;smtp from="linyongtang1000@163.com" deliveryMethod="Network"&gt;
          &lt;network host="smtp.163.com" port="25" userName="linyongtang1000" password="2232857" /&gt;
        &lt;/smtp&gt;
      &lt;/mailSettings&gt;
    &lt;/system.net&gt;
  
  
  &lt;/configuration&gt;
  </code></pre>