开发者

ASP.NET WebForms and MVC Hybrid - Strange characters in URL (random stuff)

I am in the process of creating a hybrid webforms / mvc app. It all works find in VS with its debug web server. However, after overcoming numerous other issues and I am now stuck with a od problem indeed.

When viewing pages served by controllers I am getting random characters show up in the URL - but the site still works, I think. For example, navigating to /Route/Index takes me to (S(1t2ba055d2unxyqllwuntf55))/Route/Index

Why are these odd characters being generated?

My routes look like this in Global.asax

routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
        routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
        routes.IgnoreRoute("{resource}.asmx/{*pathInfo}");
        routes.IgnoreRoute("{resource}.svc/{*pathInfo}");


        routes.MapRoute("Route", "{controller}/{action}/{id}",
            new { action = "Index", id = "" });

I was informed I had to add a default route without a controller otherwise people could not navigate to / (the root). MVC wou开发者_运维技巧ld try and map this. Wonder if this controllerless rule is part of the issue.

Thanks


(1t2ba055d2unxyqllwuntf55) looks like cookie-less sessions. Check your web.config and make sure it reads something like:

<sessionState cookieless="false" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜