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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:21:39+00:00 2026-06-11T02:21:39+00:00

I am programming a web-service with Asp.Net MVC4. I am using WinForms for the

  • 0

I am programming a web-service with Asp.Net MVC4. I am using WinForms for the Client.
I have implemented a SearchController that is able to return a list of Items.

[HttpGet]
public IEnumerable<Shared.Item> ByTag(string search)
{
    ModelDbContext db = ModelDbContext.Current;
    db.Items.Load();
    //find some items....
    return itemList;
}

I am calling it like this:

public Task<IEnumerable<Item>> SearchByTag(string tag)
        {

            client.BaseAddress = serviceAdress;
            var getStuffCall=client.GetAsync("Search/ByTag/" + tag);
            var r=getStuffCall.ContinueWith(
                t =>t.Result.IsSuccessStatusCode? (t.Result.Content.ReadAsAsync<IEnumerable<Item>>().Result):new List<Item>()
                );
            return r;
        }

This works fine. Now I would like to upload also an Item to the server. The problem is, that my type Item is structured and also contains a list of files and a list of pictures. As far as I understood, this does not work with a json-object. Or can I somehow wrap/encode my files and pictures?

  • 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-11T02:21:41+00:00Added an answer on June 11, 2026 at 2:21 am

    From WinForms, you’re likely going to want to use WebClient, which allows you to POST multi-part forms to the server.

    Just remember that HTTP wasn’t really designed for file transport, so just consider that if you have a whackload of files to push.

    Finally on the controller you’re going to want to do something like this: How To Accept a File POST

    There are a couple of relevant links there and some good samples.

    Hope this helps a little more.

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

Sidebar

Related Questions

Am new to Asp.Net Programming, Have just started a web project. Am calling a
I am programming a web API client in PHP that parses CSV data into
Most of my company's web programming background is PHP, so ASP.NET MVC was a
I've been reading some async articles here: http://www.asp.net/web-forms/tutorials/aspnet-45/using-asynchronous-methods-in-aspnet-45 and the author says : When
I am new to web programming and Visual Web Developer. I have made a
I am trying to learn web programming using Java, and I ran into bunch
I'm reading a book about programming ASP.NET in C#. The book makes the following
i need to develop a .net library which exposes a java web service proxy
I'm looking for a blogging site to host my ASP.Net/C# (and possibly other web
I have been programming .NET for 2 years now, but I have never came

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.