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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:23:13+00:00 2026-05-26T00:23:13+00:00

I have a problem with ASP.NET MVC3. I’m trying to post some parameters to

  • 0

I have a problem with ASP.NET MVC3.

I’m trying to post some parameters to a JSONResult action. It works great when i use GET, but when i use POST, i get an error, because apparently when using POST, it won’t accept my integer parameters as such, and say that the parameters dictionary contains a null value for them.

Anyone run across this before? Thanks.

Edit: some code, as requested:

public JSONResult PostingHere(string username, int someotherparameter) {
    //Code   
}

Really, that’s all that matters, because the exception is thrown then and there when POSTing because apparantly a null value gets passed to the someotherparameter parameter. When using GET, as said before, it works just dandy.

The intended use is to post with a NSURLRequest from an iPhone, but I’ve been debugging with a firefox extension called Poster and i get the same result. Full error:

The parameters dictionary contains a null entry for parameter ‘someotherparameter’ of non-nullable type ‘System.Int16’ for method ‘System.Web.Mvc.JsonResult PostingHere(System.String, Int16)’

Edit 2: By request, I’ll add an example of calling the action which results in the error:

<form action="http://fullurlhere.com/Controller/PostingHere" method="POST">
<input type="hidden" name="userid" value="astring" />
<input type="hidden" name="someotherparameter" value="100" />
<input type="submit" value="Brace for impact" />
</form>

Edit 3: The post data; never mind the discrepancy in variable names, these are the actual names of them.

Result of the Post

Edit 4: Adding to the mystery, the problem disappears when testing against a local server on my own computer, with the very same MVC Project the server is running. So the problem is likely within a server-side setting.

Solved: Turns out when i evalutated the request, that the server was redirecting me to https:// from the http://, causing me to lose my POSTed data. Thanks to everyone for being such good sports.

  • 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-26T00:23:13+00:00Added an answer on May 26, 2026 at 12:23 am

    Solved: Turns out when i evalutated the request, that the server was redirecting me to https:// from the http://, causing me to lose my POSTed data. Thanks to everyone for being such good sports.

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

Sidebar

Related Questions

I need some help on this problem. It is about ASP.NET MVC3. I have
I have this problem in my ASP.NET application where I'm seeing some of my
I have an asp.net mvc3 project, it has some reports in aspx web pages.
Assume we have an ASP.NET MVC3 Web site that makes use of Entity Framework
I am building an asp.net mvc3 application and I have decided to use areas
I have a curious problem with ASP.NET MVC3 client-side validation. I have the following
I have an ASP.NET MVC3 project. I want to insert some <td> 's in
I Have a little problem with WebGrid control for Asp.Net MVC3. What I want
Well, this is an interesting problem. I have an ASP.NET MVC3 Intranet application running
I have some C# code in my ASP.NET MVC3 project that's throwing an exception

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.