login about faq

I'm using the VB.Net 4 DLL ( and when posting to a PHP page set to output the User-Agent, this is always blank.

I have tried using AddHeader on the request (HttpRequest), UserAgent on the HTTP object and SetRequestHeader on the HTTP object all without success.

I have also tried upgrading to the latest version of the DLL and this didn't seem to resolve the issue.

The PHP page is very basic and just reads $_SERVER['HTTP_USER_AGENT'] and outputs it to a file. Using a browser works fine.

Are there any suggestions to get this to work?

asked Aug 30 '17 at 03:58

JHilton's gravatar image


Headers such as User-Agent, are only automatically added for HTTP methods that don't have an HttpRequest object argument. For methods such as SynchronousRequest where an HttpRequest object is passed in, the headers are completely specified by the HttpRequest object.

To summarize:

For methods such as QuickGetStr, QuickPutStr, PostJson, etc, where there is no HttpRequest argument, then some default headers are added, and request headers can be added/modified/removed by calling SetRequestHeader and RemoveRequestHeader.

For methods where an HttpRequest argument exists, the headers are specified by the HttpRequest object, and nothing is implicit (except for Content-Length).


answered Aug 31 '17 at 08:57

chilkat's gravatar image

chilkat ♦♦

I recommend trying the latest version of the library to see if it is a bug that has already been fixed.


answered Aug 30 '17 at 18:07

jpbro's gravatar image

jpbro ♦


As per the original question, I have already tried upgrading to the latest DLL without any luck.

(Aug 31 '17 at 02:55) JHilton

Your original post indicates you are using, but the latest is

(Aug 31 '17 at 08:47) jpbro ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Aug 30 '17 at 03:58

Seen: 2,684 times

Last updated: Aug 31 '17 at 08:57

powered by OSQA