I'm creating a HTTP server by doing the following:
retCode = HttpInitialize(
HttpApiVersion,
HTTP_INITIALIZE_SERVER, // Flags
NULL // Reserved
);
retCode = HttpCreateHttpHandle(
&hReqQueue, // Req Queue
0 // Reserved
);
retCode = HttpAddUrl(
hReqQueue, // Req Queue
localUrl.c_str(), // Fully qualified URL
NULL // Reserved
);
localUrl
would be something like http://192.168.1.x/someUrl
or http://37.123.43.x/someUrl
. The base URL obviously doesn't change in between adding Urls.
HttpInitialize
and HttpCreateHttpHandle
return success. However, HttpAddUrl
returns with error 1214 (ie. ERR_INVALID_NETNAME
) when I use a non-local IP address. I'm starting the program as an administrator.
What can the problem be?