The server committed a protocol violation ...
While downloading or uploading data from Virtuemart into the VMCClient (VB.NET Sample client), you get the following error:
"The server committed a protocol violation ..."
This error, “the server committed a protocol violation” is well-known and very generic, many very different reasons can cause this error.
The Web server used on your hosting might send from time to time invalid http header structure or characters. This one of the most frequent reasons.
You should try to download your products by setting in the VMCClient the "number of records per packet" =1 instead of 5, in the VMCClient Controls Tab.
If you still have an this error, here are the other points to check which can cause the same error:
- If you used copy/paste from MS Word to Virtuemart text editor for products description, Word adds XML tags behind the scene (in the HTML) and this will generate this error when products are downloaded.
If you are able to download all categories without errors and if you get this error on products download, this might be the cause.
You need to clean the products'description of all this wrong XML. - Default protocol used by VMConnector is HTTP 1.0, if your client uses HTTP 1.1 this may produce this error
- Editor invalid characters or not UTF8
- Internet line interruption / quality
- ISP Hosting quality (servers, lines, software maintenance, hacking)
- Your PC Virus status, a trojan can take up all the Internet bandwidt
- The Virtuemart tables relational integrity (loading the tables outside Virtuemart framework), some MUST fields are missing!
Another frequent reason is the character set / encoding used within MySQL database AND Virtuemart tables.
You can check if it's the case by going into the Joomla admin screen and select:
- Select Menu: Help / System info / Tab: System info (Joomla 1.5.x)
- If you see that Database Collation is: latin1_swedish_ci or another one except utf8_general_ci
This is wrong, it should be: utf8_general_ci (underlying Virtuemart tables should be set to UTF8 too).
- Virtuemart tables'collation should be utf8_general_ci
For example, if you use « Latin1_swedish_ci » within your Virtuemart tables instead of « utf8_general_ci », VMConnector try to translate it into UTF-8 and the resulting XML message sent back to the VMCClient is not formed correctly. Then the client throws an error to let you know and stops the download .
To correct it, just transform all you Virtuemart database and tables (when possible) into « utf8_general_ci », and this should solve the upload & download problem.
The best is to have UTF-8 everywhere (html. templates, database, tables, VMConnector) and here are more detailed explanations: Characters are missing or incorrect (UTF-8 encoding)

