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

  • Home
  • SEARCH
  • 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 8288261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:14:45+00:00 2026-06-08T12:14:45+00:00

I have a pretty standard route like this, {controller}/{action}/{id} , where id is optional.

  • 0

I have a pretty standard route like this, {controller}/{action}/{id}, where id is optional.

Consider these three PUT actions:

public void DoSimpleStuff(int id) {/*DoingStuff*/ }
public void DoMoreStuff(StronglyTypedObject sto) {/*DoingStuff*/ }
public void DoExtraStuff(int id, StronglyTypedObject sto) {/*DoingExtraStuff*/ }

DoSimpleStuff works out of the box.

To make DoMoreStuff work I needed to disable the model binder. So I implemented a custom IRequestContentReadPolicy returning RequestContentReadKind.AsSingleObject.

However, that doesn’t fix DoExtraStuff.

So my question is, what can I do to fix DoExtraStuff? Shouldn’t the route understand that only the last parameter comes from the content, and hence pass that type to my serializer?

PS: I realize they’ll change how this work, but I need a solution for this now. Creative answers appreciated.

  • 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-08T12:14:46+00:00Added an answer on June 8, 2026 at 12:14 pm

    In asp.net mvc 4 beta this was hard to do. In fact I had to work around it as I didn’t find a way (if there was one) to achieve this.

    However, in asp.net mvc 4 rc you simply apply the [FromBody] and [FromUrl] attributes to your action parameters, and you’re good to go. Nice! 🙂

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

Sidebar

Related Questions

I have a pretty standard Spring 3.0.7 web app The structure is like this
this is just some pretty standard code I have tried. What I am trying
I have a pretty standard database like: id | name | last_name | gender
I have some pretty standard flipping action going on: [UIView beginAnimations:@swapScreens context:nil]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft
I currently have a a pretty standard jqgrid that I would like to change
I have a pretty standard setup where I have an array in my controller
I have a pretty standard scenario where I have a model which in this
I have a pretty standard Xcode-generated interface for Core Data objects, namely these properties
I have a pretty standard asp.net web api set up with get post put
I have pretty standard Qmail toaster installation. I'm using the dot files to set

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.