Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9169727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:55:07+00:00 2026-06-17T15:55:07+00:00

I have a problem with MVC routing, it normally works great but for some

  • 0

I have a problem with MVC routing, it normally works great but for some reason the statement in the middle works fine but the last route does not work. If I put the third route in the middle it will work fine. I don’t know why these two routes are interferring with each other.

Here are the routes:

routes.MapRoute(
           "VoucherPreviewNdddewUser", // Route name
           "{Home}/{VoucherBusinessUserEntry}/{ID}/{TokenID}", // URL with parameters
           new { controller = "Home", action = "VoucherBusinessUserEntry", id = 0, TokenID = Guid.NewGuid() } // Parameter defaults
           );

                routes.MapRoute(
                "Regdfsdfsdf", // Route name
                "{LoginReg}/{Register}/{UserTrackingID}/{IsFromScript}", // URL with parameters
                new { controller = "LoginReg", action = "Register", UserTrackingID = System.Guid.Empty
                    ,isfromscript = System.Boolean.FalseString 
                } // Parameter defaults
            );

Here are the Url’s:

http://localhost:50839/home/VoucherBusinessUserEntry/44/7209FA62-FD5F-40AE-8239-7CF1855675E8

http://localhost:50839/LoginReg/Register/7209FA62-FD5F-40AE-8239-7CF1855675E8/true

Does anyone have any ideas what might be causing this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:55:08+00:00Added an answer on June 17, 2026 at 3:55 pm

    When you put something between {} that becomes a variable. So your routes should really look like this:

    routes.MapRoute(
           "VoucherPreviewNdddewUser", // Route name
           "Home/VoucherBusinessUserEntry/{ID}/{TokenID}", // URL with parameters
           new { controller = "Home", action = "VoucherBusinessUserEntry", id = 0, TokenID = Guid.NewGuid() } // Parameter defaults
           );
    
    routes.MapRoute(
                "Regdfsdfsdf", // Route name
                "LoginReg/Register/{UserTrackingID}/{IsFromScript}", // URL with parameters
                new { controller = "LoginReg", action = "Register", UserTrackingID = System.Guid.Empty
                    ,isfromscript = System.Boolean.FalseString 
                } // Parameter defaults
    

    You still need to define which controller and action you want, but those variables are no longer present in the URL as they are constants and not up for debate. If you want them to be variable, then you need {controller} and {action} in the URL, with defaults of, for example, LoginReg as in the second route.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got some routing issues with MVC 2. Might be a simple problem, but
a have a problem with ASP.net MVC url routing. I have created this route
Hi everyone I have a problem with MVC3 routing and areas: My route matches
I'm using System.Web.Routing to have some better URL's and have come across a problem.
I'm coding some web-applications in MVC, and I have a problem with something that
I've an interesting problem with some routing with an ASP.NET MVC app. I'm building
I'm not positive, but I think this is an MVC routing problem. I still
I have an MVC 3.0 Routing problem. I have the following in a CheckListController
Today I had a problem with some routing in my ASP.NET MVC 3 application
I'm trying out ASP.NET MVC routing and have of course stumbled across a problem.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.