REST/JSON, XE8, Error 87 Basic auth with long usernames

I am attempting to write a REST/JSON client for a specific API, however I 
am running into an unusual issue.

This API requires I create an API-Key (much like Whirlpool's API key) to 
access the REST API.

This API key is to be used as the username (no password) using Basic 

When the  THTTPBasicAuthenticator attempts to add the header for usernames 
longer than 56 to the request using the WinHTTP function 
"WinHttpAddRequestHeaders" I get an Error 87 "The parameter is incorrect".

Given the header is of the form: Basic base64(<username>:<password>) – it 
seems that at some point the header is too long.

I've checked, there doesn't seem to be any inherent length limits on 
headers, and I can for the life of me work out why Windows isn't letting me 
do it.

Any help would be appreciated.

5/21/2015 1:50:39 AM
embarcadero.delphi.webservices 976 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 17


Similar Artilces:

errors errors errors..
Name: harun Email: harunbjk1903hrnatgmaildotcom Product: Firefox Summary: errors errors errors.. Comments: first of all when i launch firefox (3) i cant enter websites via writing.. for example when I type "google" and then press ctrl and enter, it crashes.. and i take lots of error reports. firefox 2 was better.. see you again , harun Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9) Gecko/2008052906 Firefox/3.0 From URL: ...

How create webservice client with Basic auth and proxy
Dear Friends, There is a webservice that I am writing a client for it. The web service required basic auth and my computer connect to internet through local proxy. How set Auth userName and password and also proxy info (IP,Port,UserName,Password) to access server? Thanks Am 05.03.2010 15:57, Moh Tarvirdi wrote: > Dear Friends, > There is a webservice that I am writing a client for it. The web service required basic auth and my computer connect to internet through local proxy. > How set Auth userName and password and also proxy info (IP,Port,UserName,Password) to access server?...

error error error
These are the 2 new errors i am getting now:   1).  Server Error in '/' Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.Source Error: Line 53: ...

Error: Cannot convert JSON value in REST DataSnap
Hi, I'm building an app using iOS (via Objective-C) and this works fine. The application is going to send/receive data from a DataSnap REST server. However - one or two functions need to send multiple parameters at once to the DataSnap server (not appended to the URL), I get the following error in response: - *{"error":"*Cannot convert JSON value* {\"mileage_date\":\"04\/47\/2012\",\"client_ref\":\"\",\"mileage_type\":\"Fee Work\",\"mileage_description\":\"description\",\"mileag...

Error, Error and more errors
Okay, all I wanted to do was test this app out and it has been a nightmare. 1.) Didn't install the sql database. I had to manually install it. 2.) I get errors when trying to add a picture to an album. "Procedure or function ngUpdatePicture has too many arguments specified" Any ideas? I've gotten more errors than this, but there is no use in bitchin. Are you using the v1.6.1 installer? Also, did you select to install the SQL Server db and give it a valid admin login? What were some of the error messages? Did you have an existing DB from a previous install? ...

How to access .NET WCF REST webservice from Delphi XE?
Hi, I have built a Visual Studio .NET WCF RESTful webservice with C#. I also added SSL encryption (HTTP/S) and user authorization. From browser I can Access the Server. Now I want to access that Server from a Delphi XE Client application, too. I tried the DataSnap REST Client modul, but I cannot connect ("socket error 10054 - Socket was resetted by peer"). Maybe the Delphi wizzard expects DataSnap possibilities which of course are not included in my Standard .NET Server? So, how can I access it? Does anybody know? Regards, Patrick > {quote:title=Patrick Krause wr...

I'm working on a project where we're returning JSON results from our Delphi server to a mobile app developed by another company. I need to be able to return a fail result - ie. an incorrect parameter value or a record not found. function ReverseString(Value: string): TJSONValue; If your return type for a method is a TJSONValue, and it's sucessful it will look like: {"result":"dlrow olleh"} How do you get it to return an error condition? ie. {"error":"Cannot reverse an empty string"} I know that I can do it by ...

Error installing window service with incorrect UserName - How to trap this error
Hi, I am running a .bat file to install my .net application as window service.  In my ProjectInstaller Class, New Method, I am just assigning username, password and Account to ServiceInstaller1.  Now, If I assign invalid username here, service installation gets failed but I want service to get installed even if this assigned UserName is invalid. Here is my .bat file, just having two line of code.%windir%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe C:\Development\MyService\Bin\Debug\MyService.EXE>> MyScripts.log net start MyService>> MyScripts.log&...

REST server response type as json or xml Delphi XE6
How can I set REST Application server's response type as json or xml? This setting will be done through ini file. My Application will be stand alone and ISAPI. > {quote:title=Md. Shariful Alam Khan wrote:}{quote} > How can I set REST Application server's response type as json or xml? This setting will be done through ini file. My Application will be stand alone and ISAPI. I am to interested on how / if this can be done. ...

ANN: DataSnap-like Client-Server JSON RESTful Services in Delphi 7-2010 [Edit]
How to implement a very useful service... say... adding two numbers? In our framework, you code Server-Side: {code} function TSQLRestServerTest.Sum(aRecord: TSQLRecord; aParameters: PUTF8Char; const aSentData: RawUTF8; var aResp, aHead: RawUTF8): Integer; var a,b: Extended; begin if not UrlDecodeNeedParameters(aParameters,'A,B') then begin result := 404; // invalid Request exit; end; while aParameters<>nil do begin UrlDecodeExtended(aParameters,'A=',a); UrlDecodeExtended(aParameters,'B=',b,@aParameters); end; aRes...

system error 1114, system error 87
Hi I am trying to connect to Sybase database using ADO, ODBC DSN-less, Sybase System 10 or Sybase Sytem 11. I am successful in connecting during development and debugging environment. On many of the machine deployed application works fine. But on couple of the machine, I am getting following message. Specified Driver could not be loaded due to system error 1114 (Sybase System 10) I have tried with Sybase System 11. I get the same message. There is only one version of ODBC installed. MDAC 2.7 has been installed. Sybase System 10 (sysybnt.dll) 2.12.0000 INTE...

Error on Delphi 6 but not on Delphi Xe for Ftp
I am Experimenting with get a file from our webside server via Ftp. I have 2 Machines 1 a laptop runing XP Delphi 6 Indy An a machine runing Window 7 Delphi XE2 with Indy I am using the Same Code on Both. procedure TFrmMain.ProcessItemDalySpecial; var PathDest : String; FileName : String; begin with FrmTb2 do begin if ReadIniBoolean(IniCfg,'FTP','UseFtpDaly') then begin Ftp.Host := ReadIniStr(IniCfg,'FTP','HostDaly'); Ftp.Port := ReadIniInt(IniCfg,'FTP'...

Getting error: Invalid response from webservice error
Anyone ever get this message before? Error: Invalid response from webservice:*url*: Invalid Request: Untranslatable Request Tags --> Invalid Request: Untranslatable Request Tags --> Exception from HRESULT: 0x80040613. Line 36: public System.Xml.XmlElement SubmitXml(string Profile, System.Xml.XmlElement Request, System.Xml.XmlElement Filter) Line 37: { Line 38: object[] results = this.Invoke("SubmitXml", new object[]{Profile, Request, Filter}); Line 39: return ((System.Xml.XmlElement)(results[0])); Line 40: } it is erroring on Line 38. T...

DBD::Oracle and strange problem with Oracle error 'ORA-01461: can bind a LONG value only for insert into a LONG column' when data not LONG
------=_NextPart_000_0154_01C4C321.83509550 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0155_01C4C321.83509550" ------=_NextPart_001_0155_01C4C321.83509550 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I had an application that was processing a bunch of xml and inserting into a table with a bunch of VARCHAR2(4000) columns. A couple of the entries I was processing caused the 'ORA-01461: can bind a LONG value only for insert into a LONG column' error. I put checks in for the length o...

Web resources about - REST/JSON, XE8, Error 87 Basic auth with long usernames - embarcadero.delphi.webservices

Wikipedia:Username policy - Wikipedia, the free encyclopedia
... When choosing an account name, do not choose names which may be offensive, misleading, disruptive, or promotional. In general, one username ...

Facebook Makes It Easier For Pages To Change Username
Facebook announced Wednesday that it is making it easier to change the username of a Facebook page . Before, page administrators would have to ...

Coming Soon: Facebook Usernames
von Kathy H. Chan, Dienstag, 9. Juni 2009 um 12:11 UPDATE on Saturday, June 13: Username selection is now live at ...

Coming Soon: Facebook Usernames
UPDATE on Saturday, June 13: Username selection is now live at Remember, choosing a username is optional and ...

Breaking: Facebook Username Landrush to Start June 13 at Midnight
The Facebook vanity URL landrush is on. Starting this Saturday morning, June 13, at 12:01am EDT, Facebook users will be asked to choose a username ...

When Did You Join Twitter?
Find out when you joined Twitter

Flickr: Photos & Video from [username here]
Explore [username here]'s photostream on Flickr. This user has 0 photos on Flickr.

Wikipedia: Username - YouTube
Who edits Wikipedia? Meet some of the volunteer editors from around the world who help make projects like Wikipedia a reality. Also available ...

Snapchat hacked, leaking 4.6 million usernames and phone numbers
4.6 million Snapchat usernames and numbers have leaked after hackers exploited a security flaw exposed by Australians and posted the information ...

Google wants YouTubers to ditch usernames, start using full names
As BetaBeat first noticed, Google is attempting to peel back the anonymity cloak that surrounds YouTube. The search engine, which seems to dabble ...

Resources last updated: 12/10/2015 10:16:04 AM