Henchman24
Posts: 9
Joined: Wed Oct 07, 2009 8:15 pm

Server-side validation response

I've setup a web service validate a serial number. I've followed the instructions in the help doc for the response, but, no matter what I send back, I get a message box with the response.

For example, when I respond with a '601', the following text appears in the message box:

<string xmlns="http://tempuri.org/">601</string>

I'm assuming that I'm not forming my response correctly....
Henchman24
Posts: 9
Joined: Wed Oct 07, 2009 8:15 pm

Re: Server-side validation response

I've figured out part of it, I added a reponse.write to my web method instead of just returning the result string.

Code: Select all

HttpContext.Current.Response.Write(result);
This seems to work great for a response of 601 (i.e., the installer continues to the EULA dialog). But, if I send back a 602, I'm still seeing the weird formatting of the error message:

Registation Invalid<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://tempuri.org/" />
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Server-side validation response

Hello,

Your server side script should only return the response code with absolutely NO formatting. From your description it appears your script is returning an xml.

In essence, your script must return the response code optionally followed by an error message. After this, nothing else must be written to the output. To that extent you should use output buffering, then discard the buffer, and only output the response code and the message.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Henchman24
Posts: 9
Joined: Wed Oct 07, 2009 8:15 pm

Re: Server-side validation response

Thanks Gabriel, got it...

Return to “Common Problems”