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 7043077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:14:43+00:00 2026-05-28T02:14:43+00:00

I need to start processing a URL that will contain some emailand a GUID.

  • 0

I need to start processing a URL that will contain some emailand a GUID. Some thing like following where first param is email address and second param is a Guid.

http://www.myWebSiteurladdress.com/Account/MyActionMethod?MyEmail=me@here.com?MyId=222DF915-264E-4034-BF26-22EB1165667C

For this I have modified my routing as below

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

    routes.MapRoute(
       "RouteABC", // Route name
       "{controller}/{action}/{mail}/{id}", // URL with parameters
       new { controller = "Account", action = "MyActionMethod", mail = string.Empty, id = Guid.Empty } // Parameter defaults
   );

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

Then I have my action method like below.

 public class AccountController : Controller
    {
        public ActionResult MyActionMethod(string email, Guid id)
        {

            ............
        }

Problem is when I go on the above url, http://www.myWebSiteurladdress.com/Account/MyActionMethod?MyEmail=me@here.com?MyId=222DF915-264E-4034-BF26-22EB1165667C I get following error. Any ideas what I may be doing wrong here?

The parameters dictionary contains a null entry for parameter ‘MyId’
of non-nullable type ‘System.Guid’ for method
‘System.Web.Mvc.ActionResult MyActionMethod(System.String,
System.Guid)’ in ‘SmartChartsMVC.Controllers.AccountController’. An
optional parameter must be a reference type, a nullable type, or be
declared as an optional parameter. Parameter name: parameters

  • 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-05-28T02:14:44+00:00Added an answer on May 28, 2026 at 2:14 am

    You could have a single question mark in a properly formatted url. It is what separates the path portion from the query string. So the url you are trying to navigate to is not valid.

    A far more realistic url could be the following:

    http://www.myWebSiteurladdress.com/Account/MyActionMethod/me@here.com/222DF915-264E-4034-BF26-22EB1165667C
    

    Also make sure that your route name token matches your action parameter. In your Global.asax route definition you used {mail} whereas in your action argument you use email as name of the parameter. Make sure you are consistent in your naming convention.

    And if you simply wanted to have an url like this:

    http://www.myWebSiteurladdress.com/Account/MyActionMethod?MyEmail=me@here.com&MyId=222DF915-264E-4034-BF26-22EB1165667C
    

    then you don’t need to add any custom routes as the default route will be sufficient to call the following action:

    public class AccountController : Controller
    {
        public ActionResult MyActionMethod(string myEmail, Guid myId)
        {
            ...
        }
    
        ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to start messing with a vb.net(vs2008) project file and I'd like a
I'm trying to create a bookmarklet that will start off an AJAX call to
I'm about to start a new Windows app. It will be an audio processing
Ok, so i have Call1 in a webservice that will start a bacground worker
I'd like to start using asynchronous processing in IIS. Edit: I'm talking about using
What is the right start in image processing using C# I need to know
I need start off with code because I am not sure what terminology to
Normally to attach a debuger to a running jvm you would need start the
I need to start and stop SQL Server from the command line. I am
I need to start developing in FORTRAN, any recommendations on learning\developing FORTRAN coming from

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.