Dies ist das erste Mal, das ich eine MVC2-Anwendung (.NET4) auf IIS7.5 bereitstelle. Ich benutze StructureMap und Fluent NHibernate, und alles läuft gut lokal mit integrierter Sicherheit. Die Anwendung rendert die erste Seite(), aber wirft einen Fehler auf den nächsten (controllername/pagename/id
).iis7.5 mvc2 404 und 500.24 Fehler
Ich habe %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir
gelaufen. HttpRedirection und HttpExceptions sind aktiviert.
Dies ist der Fehler 404 aus View Quelle:
[HttpException]: The controller for path '/conrollername/pagename/1' was not found or does not implement IController.
at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType)
at CustomerResponses.Infrastructure.StructureMapControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) in C:\Apps\Development Source\CustomerResponsesApplication\trunk\CustomerResponses\Infrastructure\StructureMapControllerFactory.cs:line 19
at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName)
at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)
at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Ein weiterer Link gibt mir 500,24 Fehler:
HTTP Error 500.24 - Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
Hat jemand irgendwelche Ideen? Dank
Teil auf Web.Config
system.webServer - Abschnitt
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true"/>
<handlers>
<add name="UrlRoutingHandler"
preCondition="integratedMode"
verb="*" path="UrlRouting.axd"
type="System.Web.HttpForbiddenHandler,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>
<!--<handlers>
<remove name="MvcHttpHandler" />
<add name="MvcHttpHandler" preCondition="integratedMode" verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler" />
<add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>-->
Global.asax
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
routes.IgnoreRoute("{resource}.gif/{*pathInfo}");
routes.IgnoreRoute("{*datepick}",
new { datepick = @"(.*/)?jquery.datepick.css(/.*)?" });
// ignore datepick.css file
routes.IgnoreRoute("{*favicon}",
new { favicon = @"(.*/)?favicon.ico(/.*)?" });
routes.IgnoreRoute("{*chevron}",
new { chevron = @"(.*/)?Images/Chevron.gif(/.*)?" });
routes.IgnoreRoute("{*iconhome}",
new { iconhome = @"(.*/)?Images/IconHome.gif(/.*)?" });
routes.MapRoute("test", "testroute",
new { controller = "compresponses", action = "list" });
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new {
controller = "compresponses",
action = "list",
id = UrlParameter.Optional
} // Parameter defaults
);