asp.net mvc maproute

Posted by niao on Stack Overflow See other posts from Stack Overflow or by niao
Published on 2010-03-17T19:30:01Z Indexed on 2010/03/17 19:31 UTC
Read the original article Hit count: 480

Filed under:
|
|

Greetings, I have a problem with link in mvc application. When I run it via Visual Studio it's ok. The link then is as follows: http://localhost:2566/ActivateClient/Activate/6543e2d6-707d-44ae-94eb-a75d27ea0d07

when I run it via IIS7 the link is as follows: http://localhost/ActivationService/ActivateClient/Activate/6543e2d6-707d-44ae-94eb-a75d27ea0d07

The default route is as follows:

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

        routes.MapRoute(
            "Default",                                              // Route name
            "{controller}/{action}/{id}",                           // URL with parameters
            new { controller = "Home", action = "Index", id = "" }  // Parameter defaults
        );

    }

I assume I have to change this MapRoute, am I right? How to change it? ActivationService is my virtualDirectory in IIS. Can someone help me with this please?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about mvc