Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

base64 Image - HTTP Error 414. The request URL is too long.

Posted on 2016-10-13
4
Medium Priority
?
771 Views
Last Modified: 2016-10-17
I have developed a mobile application that connects to a web service to insert data into my SQL database. I am attaching images using the device's camera, and I convert this image into a base64 as a parameter inside the URL. I have been trying to send it to my web service, but I get this error:

HTTP Error 414. The request URL is too long.

The URL is approximately 22000 characters long. I am using post. I already maxed the web.config maxAllowedContentLength and maxUrl and all those.

I am also using angularjs and ionic.
0
Comment
Question by:gianfranco000
4 Comments
 
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 500 total points
ID: 41842858
If you are using POST properly, the data is not visible in the URL.  ??
0
 
LVL 30

Assisted Solution

by:Dr. Klahn
Dr. Klahn earned 500 total points
ID: 41842903
The URL is approximately 22000 characters long.

That is far too long for a URL.  imo, a URL should be less than 1000 characters.  URLs were not intended to be used for data transfer.

Suggest:  Pass the data by HTTP in a page body or by FTP/SFTP instead.
0
 
LVL 27

Expert Comment

by:BigRat
ID: 41844020
I think gianfranco, you're going to have to post your code.
0
 
LVL 60

Accepted Solution

by:
Julian Hansen earned 1000 total points
ID: 41844021
GET (URL parameters) has a length limit - you should not exceed 2000 characters for it to have any reasonable chance of working in all browsers. Remember the URL is measured by the entire length including protocol string and domain - not just the payload after the ? - not that this makes much difference in your case.

If you are sending a lot of data you should POST them instead preferably using multipart boundaries.
1

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

963 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