You might get a weird error when you publish your .NET site to a Windows 7 machine:

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

Config Error This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".  

The fix for this requires a change to applicationHost.config, located at:

%windir%\system32\inetsrv\config\

Change the following section overrideModeDefault values from "Deny" to "Allow" for the system.webServer section in configSections:

<section name="**handlers**" overrideModeDefault="Deny" /> 
<section name="**modules**" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />

You might also get the following 404 error:

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

Module StaticFileModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x80070032

You will get this error if your IIS isn't configured to run ASP.NET applications. Go to Control Panel > Programs > Turn Windows features on or off > Internet Information Services > World Wide Web Services > Application Development Features and select "ASP.NET" (which will automatically select all required dependencies).

You might then get this error:

Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

You will get this error if your website is in .NET 4.0 but the app pool that your website is running under is targeting .NET 2.0. To fix it, go to IIS Manager > Application Pools and select your website's app pool (probably the DefaultAppPool). Click on "Basic Settings" in the "Actions" window to the right and select the right version in the ".NET Framework version" dropdown.

Finally, you mighet get this error:

Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

This can happen if ASP.NET 4.0 installatoin wasn't registered correctly; you can fix it by running the following command from the cmd prompt:

%windir%\Microsoft.NET\Framework\v[version number]\aspnet_regiis.exe -i

You should finally see your website.