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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:14:45+00:00 2026-06-06T06:14:45+00:00

I have a web service. I use it to accept a base 64 string

  • 0

I have a web service. I use it to accept a base 64 string representation of a small (thumbnail size) image. This web service works awesome when using it with Fiddler and manually posting the request. When I run the same request with NSMutableURLRequest (or ASIHTTPRequest), it always returns a 413 status code (413 is Request Entity is Too Large).

Why would NSMutableURLRequest cause it to come up with a 413, whereas Fiddler returns 200 every time?

Here is my NSMutableURLRequest code. I could really use a push, if anybody has any ideas.

        //the image request
        NSMutableURLRequest *imageRequest=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:POST_IMAGE_API_URL] 
                                                                  cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                              timeoutInterval:240.0];

        //the post parameters
        [imageRequest setHTTPMethod:@"POST"];
        [imageRequest setHTTPBody:[imageMessage dataUsingEncoding:NSUTF8StringEncoding]];
        [imageRequest setValue:@"text/xml" forHTTPHeaderField:@"Content-Type"];


        //a few other things
        NSURLResponse* imageresponse;
        NSError *imageerror;


        NSData* imageresult = [NSURLConnection sendSynchronousRequest:imageRequest returningResponse:&imageresponse error:&imageerror];
        NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse*)imageresponse;

        NSLog(@"imageresponse: %d", httpResponse.statusCode);
  • 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-06T06:14:46+00:00Added an answer on June 6, 2026 at 6:14 am

    I found a solution for this. The issue was not on the Apple end, but on the IIS end. There is an additional parameter for IIS hosted applications (one of which being my WCF service) beyond what is specified in the WCF’s web.config file that specifies the “uploadReadAheadSize” for each service. I increased this and the 413 went away. Interestingly enough, I didn’t get this error when sending the HTTP request from Fiddler on a desktop client on the same network as the server where the service resides. Basically, I had the solution to this guy’s problem but not his context. My solution was his context.

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

Sidebar

Related Questions

I have web service, which use integrated security in IIS. Now, I want to
I have a web service and an outsource company will use my service. I
I have a Java web service and a Java web client making use of
I have a WCF web service, and I want to use Basic authentication. I
I have to use several SOAP messages to get data from a web service.
I have a website that talks to a remote WCF web service. Both use
i want use some data from a website with web service. i have a
Some background: I have a windows service with 5 web references, Everything works great
I have web service secured with SPNego (HTTP challenge returns WWW-Authenticate: Negotiate). This security
I have a Web Service ( model-layer ) which communicates with Database. This module

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.