Forums

connecting to webservice failure

greetings. My problem is that since I can not connect to pythonanywhere any webservice. with any protocol (xmlrpc, soap, curl, etc). I use web2py. and note that from my local install of web2py I have no problems. but yet from pythonanywhere I can not do it. I thank you very much for your help.

It's not clear from your post whether you're making outgoing requests to services as a client; or whether you're attempting to run a server which handles SOAP, XMLRPC, etc.

In the first case, there is a whitelist of permitted hosts for free accounts such as yours. You can only make HTTP or HTTPS requests (and anything else HTTP-based such as XMLRPC but only on the standard ports of 80 for HTTP and 443 for HTTPS) and you can only make them to one of the hosts listed on the linked page. This is to prevent someone registering lots of free accounts and using them to abuse / harass other sites. If you have a valid site you want adding to the list you can request it and the PA developers can consider whether they're happy to add it. Better still, if you upgrade to a paid account then the whitelisting restriction is lifted and you can make unrestricted outgoing connections.

In the second case, the only type of services currently supported are web applications supporting the WSGI standard, so anything you serve must be HTTP-based. However, I don't see why you couldn't implement something like an XMLRPC server with a WSGI application.

If you have any further questions, please specify what you're trying to do in a little more detail first.

Hi exerfrex,

Yes Cartroo is correct. Free accounts have very limited internet access. We do this to prevent abuse. We should probably put a little red notice on every free account that outgoing internet access is limited.