ASP.NET page published on IIS 7 reports 404

TaylorF

New Member
I am trying to get an ASP.NET MVC 4 page working on a productive system. On my local system with IIS 7 and Windows 7 Professional everything works fine.Productive system:
  • Windows Web Server 2008 R2 64 bit
  • IIS 7 with .NET 4
For the page I created a new IIS site. For the site i created a new application pool which uses: .NET Framework v4.0.30319 and integrated mode. For the application pool the flag for 32 bit applications is activated, because i need to run my application as 32 bit app.When I access the page via \[code\]https://localhost:12345/PageName\[/code\]i get the error message:(I translate it from german:) Server error in application /PageName The resource could not be found\[code\]Description: HTTP 404. The resource or a dependency could not be found...Requested URL: /PageNameVersion: .NET 4.0.30319; ASP.NET 4.0.30319.1\[/code\]The routing table:\[code\]routes.IgnoreRoute("{resource}.axd/{*pathInfo}");routes.MapRoute("Default", "{controller}/{action}/{id}", new { controller = "MyController", action = "Index", id = "" });\[/code\]The Index method of the controller looks like this\[code\][ValidateInput(false)][RequireHttps(Order = 1)]public ActionResult Index(string method, string chapterId, string sessionKey, string cn, string ui, string pw, string ProductNumber, string DocumentData){ // something...}\[/code\]web.config\[code\]...<system.web> <compilation debug="true" defaultLanguage="c#" targetFramework="4.0" /> <authentication mode="Forms"> <forms protection="All" loginUrl="~/Account/Login" timeout="1" /> </authentication> <httpRuntime requestValidationMode="2.0" /> <sessionState mode="Off" /></system.web>...<system.webServer><validation validateIntegratedModeConfiguration="false" /><modules runAllManagedModulesForAllRequests="true" /><handlers> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" /> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" /> <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /></handlers></system.webServer>\[/code\]For debugging purpose I added the http://haacked.com/archive/2008/03/13/url-routing-debugger.aspx to the Application_Start function of the global.asax file.\[code\]protected void Application_Start(){ AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); // added call here}\[/code\]The route is solved correct.IIS log\[code\]2012-12-12 15:21:04 ::1 GET /PageName - 49266 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 404 0 0 6562012-12-12 15:32:18 ::1 GET /PageName - 49266 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 404 0 0 02012-12-12 15:37:48 ::1 GET /PageName - 49266 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 404 0 0 5687\[/code\]Windows EventLog doesnt show anything mo
 
Back
Top