3

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 would try and map this. Wonder if this controllerless rule is part of the issue.

Thanks

1 Answer 1

4

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

<sessionState cookieless="false" />
Sign up to request clarification or add additional context in comments.

1 Comment

Not at all. There's so many of these settings tucked in there it's easy to miss something like this. Glad to see it resolved.

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.