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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:10:33+00:00 2026-05-24T06:10:33+00:00

I was looking to try and add a Protobuf ValueProviderFactory to MVC3 so that

  • 0

I was looking to try and add a Protobuf ValueProviderFactory to MVC3 so that I could pick out the MIME type and deserialize the raw data into objects for action parameters. I could also use this to change the default Json serializer.

Looking at JsonValueProviderFactory.cs this shouldn’t be too difficult, but the factories all appear to be hard-coded.

For Protobuf I may be able to do something with an IValueProvider but I haven’t even checked yet what MVC3 does when it recieves an MIME type of application/x-protobuf.

Am I going about this the right way?

UPDATE

I found this blog post that talks about creating an IValueProvider. It then mentions at the bottom that this changed around MCV2. He changed it to a ValueProviderFactory and calls :

ValueProviderFactories.Factories.Add(new HttpCookieValueProviderFactory());

But in MVC3 this property is read only.

  • 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-24T06:10:34+00:00Added an answer on May 24, 2026 at 6:10 am

    It turns out that it is not read only and you can add providers as follows:

    ValueProviderFactories.Factories.Add(new MyValueProviderFactory());
    

    I would have know this had I checked myself!

    I’ve done some more searching today, and this blog post seems to suggest that the DependencyResolver will find any classes that inherit ValueProviderFactory. I’m using MEF for dependency resolution so I can just add an Export attribute and it’ll get picked up automatically.

    I now have a further issue writing a custom ValueProviderFactory for protobuf-net.

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

Sidebar

Related Questions

I'm looking to try out JRuby and JRuby on Rails. I'm having trouble finding
i have been looking around to try and work out how to pass 2
I am looking to add a Notification when the app is started. That will
I'm looking to try to make an efficient delete method to work on a
If I try to quit Firefox when it's Looking up domain.com... it beachballs (hangs),
I'm looking to turn off try blocks for a specific JSP page (though turning
Thank you for looking, I try to implement in the super view (view controller)
I am currently looking at the unload event of a window to try to
I am looking at creating a web site and I want to try and
I'm looking at the Android Camera code, and when I try importing android.os.SystemProperties ,

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.