iPhone file upload to WCF Service

Posted on 2012-08-22
Last Modified: 2012-08-24

we have a WCF Rest web service which is used for uploading files to our database, which until now has only been used by .Net clients and had worked very happily. Now it has been decided that we want it to be used by an iPhone app that we are going to create.

The particular function i am concerned about is this one

        [WebInvoke(Method = "POST", UriTemplate = "UploadFile/{userName}")]
        public void UploadFile(string userName, Stream fileContent)

As you can see the function takes a .Net Stream Type as a parameter, so my question is, Will an iphone be able to upload files to this method given thats its signature exposes a .Net Type?

The body responses and requests are all in JSON format.

Thanks in advance for any help

Question by:SniperX1
    LVL 9

    Accepted Solution

    LVL 1

    Author Comment


    thanks for the response, I have seen that post before, and was what we used when we wrote the service.

    Maybe i am missing the point though, is it telling me, that my iPhone developer will be able to upload a file from an iPhone to the service using the method with the .Net Type Stream? I am assuming yes

    again thanks for the response it is very much appreciated


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
         Intro      In this article, I will show you how to parse a JSON in Swift using an open source library called SwiftyJSON ( If you haven't heard of a JSON before, it stands for JavaScript Object Notation…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now