I'm currently ready to deploy an asp.net website and looking at web hosting companies.

The C# code behind periodically uses HttpWebRequest to pull data from an external website to insert into a SQL database. This is only a server script and clients won't have any affect on when or how it runs.

This my first time deploying a site, so my question is.... do web hosting companies allow external http requests? Is there anything specific I should be looking for to ensure this will work when deployed?


The simple answer is yes. This is known as "inbound" traffic, whereas requests made by a visitor to a server (like reading this answer) is known as "outbound" traffic.

Most web hosting companies combine both into a monthly maximum amount of data transferred through their network. Some offer free inbound traffic as well. So depending on how much inbound traffic your hosting account or server will have, you might want to consider that option.

"Unmetered" bandwidth is another option in which there is no maximum outbound or inbound, but the connection to the Internet is typically not the fastest available. For a site with a reasonable amount of outbound and inbound traffic that might be a consideration if you don't want to monitor the server for bandwidth overages, which can be costly.

One final thing to confirm just to be on the safe-side is that your web hosting company doesn't block the port or range of ports that you'll need to do the request with.

  • 1
    Port 80 is the port that the remote web server listens on. The local port is usually a random high-numbered port. This allows a client to make multiple connections to a web server. – Lèse majesté Jun 3 '13 at 11:51
  • Good point. Wrote this answer before coffee :-) – dan Jun 3 '13 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy