Note that there are some explanatory texts on larger screens.

plurals
  1. POHome page in MVC app is not correctly routed with IIS 7.5
    primarykey
    data
    text
    <p>I deployed an MVC app in Windows Server 2008 R2 with IIS 7.5 (Integrated Mode). The first page that the browser should show if I enter the address (http://192.168.3.5:2011/) is a Login page. The thing is that instead I found that it executes the first ActionResult returner method found in the controller that is in the top of a allegued alphabetically ordered list ???. On the other hand if I type <a href="http://192.168.3.5:2011/Default.aspx" rel="nofollow">http://192.168.3.5:2011/Default.aspx</a> everything goes correct; it shows the Login page. My routing table in the Global.asax is defined as:</p> <pre><code> public class MvcApplication : System.Web.HttpApplication { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", "{controller}/{action}/{id}", new { controller = "Login", action = "Login", id = "" } ); } protected void Application_Start() { RegisterRoutes(RouteTable.Routes); } } </code></pre> <p>The outcome that I get is that it redirects to the following address: <a href="http://192.168.3.5:2011/Account/LogOn?ReturnUrl=%2f" rel="nofollow">http://192.168.3.5:2011/Account/LogOn?ReturnUrl=%2f</a> and then configuration error is thrown:</p> <pre><code>&lt;providers&gt; &lt;clear /&gt; &lt;add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="/" /&gt; &lt;/providers&gt; </code></pre> <p>There is a LogOn method, which is the first one declared in the Account Controller, which is the first controller alphabeticaly ordered.</p> <p>In IIS 6.0 classic mode works fine but not in IIS 7.5 (Integrated mode). This is driving me crazy.</p> <p>Thank you for your help.</p> <p>Regards.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload