locked
Routing not working when host MVC4 application in sub directory RRS feed

  • Question

  • User-987211141 posted

    Routing not working when host MVC4 application in sub directory

    Monday, April 8, 2013 7:00 AM

All replies

  • User-166373564 posted

    Hi jktiwari

    Routing not working when host MVC4 application in sub directory

    I can hardly troubleshoot just according to information above, first you should check whether you run the site with the correct application pool configuration to the target framework, at the same time there is a similar discussion about deploying a .NET MVC web application to a subdirectory in IIS, you could refer the solution in the link below, and check whether it is helpful to you,

    Deploying a .NET MVC web application to a subdirectory in IIS

    hope it helpful to troubleshoot,

    With regards

    Friday, April 12, 2013 4:04 AM
  • User-987211141 posted

    I am not troubleshooting any problem with application pool or hosting.

    Let me explain with an example :

    I have a following ajax request

    $.get("/Home/SendWelcomeMail", { name: user_name, email: email }, function (success) {
                    $("#divWelcomeMailSuccess").show();
                })

    This is working fine when i am host my application in root folder or any specific port like http://localhost:992.

    My porblem is when i am host this app in any sub directory like http://localhost/testing

    This not working

    In sub directory hosting when i am change my url like

    $.get("/testing/Home/SendWelcomeMail", { name: user_name, email: email }, function (success) {
                    $("#divWelcomeMailSuccess").show();
                })

    This is also working fine.

    How to resolve this problem??



    Saturday, April 13, 2013 4:43 AM
  • User-1477005802 posted

    Have you found the solution?

    Sunday, October 20, 2013 5:01 PM