3

I don't know what happened to my website. From today the default action "Index" in only one controller doesn't work anymore. If I call http://website.com/Valuation i get 403 error page because the webserver doesn't route my request and try to browse the folder. If I write http://website.com/Valuation/Index everything works. I search in all the code but i can't find the problem, everything seems fine like other controllers.

How can i find the problem? Do you know if there are a known issue that cause that problem or you know if there is a trace\log\debugger of routing requests?

Thanks

Mic

2 Answers 2

3

Most probably the issue is you have a folder by name Valuation in your website root. Thats why the valuation index action is not working. Instead of routing to the Controller Action the url http://website.com/Valuation is routing to the Folder Valuation.

Delete this folder Valuation from your root or rename it then this url http://website.com/Valuation will work.

Also check if the ValuationController has the public ActionResult Index() ([HttpGet] method.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks you save my day! it's a folder created by a batch program in the wrong place... now everything works! Thank you!
This worked for me, I have no idea how that directory got there
0

Check ~\App_Start\RouteConfig.cs file

public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional}
            );
        }
    }

1 Comment

I have exactly this code in my RouteConfig indeed everything in my website is routed correctly excepts just one specific controller. Few days ago was ok also this controller but now simply doesn't work anymore. Probably i have an issue in my code buy i can't find it. I need a method to troubleshoting more than a solution to fix it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.