If the web server is a 64 bit platform then you have to set the IIS manager click on default app pool, under application pools then click advanced settings on right hand side click on enable 32 bit application and set it to "True".
Second, if it is a windows 7 or Server2008 (II7) you must go to the folder where the applications are installed and you click on these folders and go to security and make sure their is a user called: IIS APPPOOL\DefaultApPool. If not add the user and give full permissions.
2008 SERVER/IIS7 ASP.NET Setup:
If IIS is not configured to work with ASP.NET web pages you must configure it. (see below)
You can also install ASP.NET 2.0 (3.0 and 3.5) using the Windows Vista and Windows 2008 user interface - just install the ASP.NET component located under IIS->Word Wide Web Services->Application Development Features. You can find this set of components in Windows 2008 by clicking Start, and click Server Manager. Expand the left-hand treeview in Server Manager and click Manage Roles, and then Web Server (IIS). In the right-hand pane look for an option that says Add Role Services. If you're on Windows Vista, click Start, click Control Panel, click Programs, and then Windows Features. Look for the following tree of features under Internet Information Services (IIS):