Solved

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

Posted on 2016-10-13
4
64 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 82

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 125 total points
Comment Utility
If you are using POST properly, the data is not visible in the URL.  ??
0
 
LVL 23

Assisted Solution

by:Dr. Klahn
Dr. Klahn earned 125 total points
Comment Utility
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
Comment Utility
I think gianfranco, you're going to have to post your code.
0
 
LVL 51

Accepted Solution

by:
Julian Hansen earned 250 total points
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
To properly understand GitHub, let’s divide it into two words ‘Git’ and ‘Hub’. Git is basically a ‘Distribution Version Control’ (DVC) and ‘Source Code Management’ (SCM) system widely used by software programmers while Hub means the efficient centre…
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…

772 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

14 Experts available now in Live!

Get 1:1 Help Now