When you preview a game in Construct 2, it runs a local HTTP server to run the game. This is to make it work as if it were really online, and also to get around browser security limitations on Javascript running from the hard disk.
However, sometimes the preview server fails to start. This means you may preview your game and see "service unavailable", or it simply times out. If this happens to you, try following these steps.
Try refreshing the page
It's possible the browser made a request before the server was ready. Wait a moment and hit refresh (F5), and the game might appear.
Close different instances of Construct 2
If you have more than one instance of Construct 2 running, they may be conflicting. Try closing all Construct 2 windows, opening just one, then preview again.
Disable browser extensions
Some badly-written browser extensions or addons break Construct 2 games. This is the fault of the extension or addon and does not mean there's a bug in Construct 2. Disabling any third party browser extensions or addons can sometimes fix problems.
Try a different browsers
It might be just one browser having a problem. Try switching to another browser and see if it works. For example, if you're previewing on Internet Explorer, switch to Firefox or Chrome and try again. The Preview Browser project property can help with this.
Check your firewall
Most computers have a firewall that block certain kinds of connections. Check your firewall allows activity on port 50000. There are many kinds of firewall out there, but the tutorial on how to preview on a local network includes steps to set up Windows Firewall.
Try changing the port
In the Preferences dialog you can change the port the preview server runs on. Try changing it to something else in the range 10000-65500 and try previewing again.
Check for other servers on your computer
Other server software, like Microsoft IIS server or multiplayer game servers, could conflict with Construct 2's preview server. Try shutting down or disabling any other software on your computer that could be acting as a server.
Try running Construct 2 as an administrator
Under normal conditions, the preview server should work on a non-admin account or when not elevated with admin permissions. However, some systems have different permission setups, and running as an administrator may get around this.
Try the Preview-on-LAN feature
Previewing with the Preview-on-LAN feature works slightly differently and may allow you to preview successfully. Try following the steps in how to preview on a local network.
Review the HOSTS file
Construct 2 previews a URL like http://localhost:50000. localhost must be set to the local address (127.0.0.1), which it is by default. On rare occasions a computer can be configured so localhost goes somewhere else, and this breaks Construct 2's preview.
Editing the HOSTS file is an advanced topic - you may wish to discuss this with your network administrator if you do not have permission or are uncomfortable making the change.
On Windows 7, the HOSTS file can be found at: %systemroot%\system32\drivers\etc\</p>
Add the following entries to ensure localhost directs to the local computer:
127.0.0.1 localhost
::1 localhost #[IPv6]
Other options
Networking is an advanced subject and there may be other network or internet settings on your computer that are causing problems for Construct 2. If you know how it may be worth double checking your computer's network and internet settings. Alternatively if you have someone who runs your network for you, try asking them for help.
If you find something else which fixes the problem for you, please let us know in the comments so we can add it to this guide!