Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hi,

I am using .net 4.0 and my requirements are,

1. Return a file stream from web - api and the deserialize the stream in GetResponse() method in MVC.
2. Upload a file from MVC - Here i have FileStream of the file.

I have searched for the above operations to be done in 4.0 framework but i can't get. HttpResponseMessage is the only solution for my requirements which is available only from 4.5 framework. Is there any solution to achieve this in 4.0 framework?
Posted

1 solution

Well, you can go for nuget package.

from VS menubar: View -> Other Windows -> Package Manager Console
from Package Manager Console type in the command Install-Package WebApi.All
in .cs add "using System.Net.Http;"

Or check this[^] for the package to install.

And another solution would be WCF REST Service.

-KR
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900