I'm sure this question has been asked many times but believe me I've tried every possible solution.
Scenario : I am using ELMAH MVC 2.0.2 in my MVC3 project and everything works perfect on my local machine. When I deploy the code on Prod/Test Servers I get the dreaded '404 Resource not found' error message. I have tried adding the relevant code to the tags but that didn't work. I was using XMLLogging on my local machine and thought it might be a folder permission issue so tried my luck using Memory logging but had no luck.
namespace abc
{
public class MvcApplication : System.Web.HttpApplication
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new ElmahHandledErrorLoggerFilter());
filters.Add(new HandleErrorAttribute());
}
public static void RegisterRoutes(RouteCollection routes)
{
string actionMethod = System.Web.Configuration.WebConfigurationManager.AppSettings.Get("actionpage");
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
//routes.IgnoreRoute("elmah.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "abc", action = actionMethod, id = UrlParameter.Optional } // Parameter defaults
);
}
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
Telerik.Web.Mvc.WebAssetDefaultSettings.ScriptFilesPath = @"~/Scripts/2011.1.315/";
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
}
}
}
I have also tried to configure Handler Mappings and Modules in IIS Manager but that didn't work either. I am not sure if I need to make any changes to the applicationhost.config file.
I have site minder installed on IIS7 on Test/Prod server and the site is protected. Is there a chance that's causing a problem? Any help will be appreciated.
I'm sure this question has been asked many times but believe me I've tried every possible solution.
Scenario : I am using ELMAH MVC 2.0.2 in my MVC3 project and everything works perfect on my local machine. When I deploy the code on Prod/Test Servers I get the dreaded '404 Resource not found' error message. I have tried adding the relevant code to the tags but that didn't work. I was using XMLLogging on my local machine and thought it might be a folder permission issue so tried my luck using Memory logging but had no luck.
Code :
Global.asax.cs
} I have also tried to configure Handler Mappings and Modules in IIS Manager but that didn't work either. I am not sure if I need to make any changes to the applicationhost.config file. I have site minder installed on IIS7 on Test/Prod server and the site is protected. Is there a chance that's causing a problem? Any help will be appreciated.
Thanks