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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:10:46+00:00 2026-05-22T12:10:46+00:00

I have an existing ASP.NET MVC 2 client application that consumes a RESTful WCF

  • 0

I have an existing ASP.NET MVC 2 client application that consumes a RESTful WCF service application for data persistence. A new requirement has come up to support an image attached/associated to one of my existing domain objects (Product).

Currently, the client application calls the service to obtain a list of Products (in the form of a list of lightweight ProductInfo objects) and displays the list to the user. When the user clicks an item in the list, the client calls the service to get the specific Product object which supports editing by the user. When saved, the client posts the updated Product to the service for persistence.

The new requirement calls for me to display the associated image in the list as well as allow the user to set/replace the image when editing the Product. The current image is also displayed in the Product editor. Only one image will be associated with each Product and the image will be required.

  1. Is Stream the best way to pass the image data between client and server or should I go with Byte[]?

  2. For the list, would it be wise to add a new Image property to ProductInfo of type Stream (or Byte[]) or require a separate call to the service to download the image?

  3. Likewise for editing, do I just treat the image data as any other property and pass it back and forth across the wire using an Image property?

  • 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-22T12:10:46+00:00Added an answer on May 22, 2026 at 12:10 pm

    While I appreciate Darin’s response and originally headed down that path, I ended up going with the same approach outlined in Pro ASP.NET MVC 2 Framework.

    Chapter 6 describes how an image can be uploaded as part of the edit page for a Product object then displayed using a controller action in another page. The only difference in my application is that persistence is handled in a different tier via a RESTful web service interface. However, based on the approach shown in the book, I decided to go with a single DTO that contains properties for the binary image data and string MIME type information.

    If I had a different UI or a heavier object to pass around, I would definitely reconsider this approach but for me, this time around, this works great.

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

Sidebar

Related Questions

I have an existing ASP.NET MVC application with some sample data in the SQL
I'm new to DDD. I have an existing ASP.NET application (not MVC) and I
I have an existing asp.net web application that I'm updating to include some MVC
I have an existing ASP.NET web application that I'm converting to MVC 1.0. The
I have an existing ASP.NET MVC 2 application that I've been asked to extend.
I have an existing 32-bit ASP.NET application that used 32-bit unmanaged DLLs. If I
I have a silverlight application that I am embedding in an existing ASP.NET web
First some brief background: I have an existing ASP.NET MVC 1 application using Entity
I have an existing asp.net mvc website that uses basic forms authentication. The site
Curious what recommendations anyone has. I have an existing asp.net forms application that does

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.