Endlich: die Lösung:








============================== ==================================================================


I've been working with the latest WebMatrix tutorials. I'm at the point where I have set up a default web site on our IIS7 and configured it for WebDeploy and successfully deployed the WebMatrix code to the server. The issue is when I try to access the default web site I receive a 404.3 error on the default.cshtml page. I've verified/tried the following

1. all WebMatrix .dll's are copied to the inetpub/wwwroot/bin directory
2. added a system.web section to the web.config
3. .Net Framework 4 Client Profile, Extended are installed on the Server
4. I looked at the Handler list and couldn't find anything set and couldn't find anything on what to set

Any ideas on other things to check or what to do is greatly appreciated?



instructions for manually setting up Internet Information Services (IIS) 7.0 and later to work with PHP:



WIN7: optionalfeatures.exe



To enable FastCGI support on Windows Server 2008 and Windows Server 2008 R2:

  1. In the Windows Start Menu choose "Run:", type "CompMgmtLauncher" and click "Ok";

  2. If the "Web Server (IIS)" role is not present under the "Roles" node, then add it by clicking "Add Roles";

  3. If the "Web Server (IIS)" role is present, then click "Add Role Services" and then enable the "CGI" checkbox under "Application Development" group;

  4. Click "Next" and then "Install" and wait for the installation to complete.














Installing IIS 7.0

This article will cover the basics of installing Internet Information Services 7.0 and the different installation modes available, when they can be used and what benefits they have.

An IIS 7.0 web server can be installed two different ways with Windows Server 2008.

  • As part of Core Server mode where IIS 7.0 is installed as one of the Server Roles,
  • The normal way through the GUI interface, where IIS 7.0 is installed as one of the Server Roles.

This article will also cover the installation of IIS 7.0 on Windows Vista. In the end I’ll also cover unattended installation of IIS.

Installation modes

On Windows Server 2008, IIS 7 can be installed in two main ways:

  • Normal mode (GUI) – with a GUI for management and administration
  • Server Core mode – only a command prompt & PowerShell is available for local server for administration, remote management is possible using MMC 3.0 and snap-ins.

The above installations can be automated. This is done using unattended installation and will be covered at the end of the article.

On Windows Vista, IIS can be installed in two ways, through the normal GUI for adding additional Windows Features to Vista, or as part of an unattended installation.

IIS on Windows Server 2008

IIS 7.0 is one of the Windows Server 2008 Server Roles. IIS can be installed through the GUI using the new Server Manager interface after the Windows Server 2008 OS is installed.

Server Manager provides a single dashboard to install or uninstall Server Roles and Features. It also gives an overview of all currently installed Roles and Features. When IIS 7.0 is chosen from the Server Manager, the basic components and services needed for IIS are automatically selected.

Installing IIS 7.0 on Windows Server 2008 is a little different from installing IIS 6.0, but it’s still pretty straightforward using Server Manager.

You can install IIS via Server Manager found in:

Start Menu – Server Manager
(it can also be found under: Start Menu – Administrative Tools – Server Manager)

Select the “Add Roles” under Roles

Select “Web Server (IIS)” on the Server Roles page:

Figure 1: Server Roles selection page

Choose the IIS Services to be installed. In this case ASP.NET is to be installed. Select the services required by your applications:

Figure 2
: Role Services selection page

When choosing the above services, you might be prompted with a warning to install some required services for the selection above, if the services are not already installed:

Figure 3: The Wizard warning page

IIS 7.0 is now installed with a default configuration for hosting ASP.NET on your Windows Server 2008:

Figure 4: Installation Results page

Confirm that the web server works using http://localhost:

Figure 5: Default website

Install only the absolutely necessary IIS Services to minimize the IIS installation footprint. This also minimizes the attack surface, one of the benefits of the new IIS 7.0.

Server Core

Windows Server 2008 can be installed in Server Core mode. Server Core is selected during the initial install of Windows Server 2008.

Server Core mode is a new feature in Windows Server 2008. It’s a low footprint server installation, where only the minimal set of binaries needed to run certain services are installed, e.g. a web server. This means that not even the Windows Shell (GUI) is installed, only a minimal footprint to boot up the server is installed and the administrator is then presented with a command prompt after boot up.

IIS 7.0 is one of the Server Roles that can be installed on Windows Server 2008 running in Server Core mode.

To install IIS 7.0 on a server running Server Core mode, run the following command:

Pkgmgr.exe /iu:IIS-WebServerRole;WAS-WindowsActivationService;WAS-ProcessModel

This installs IIS 7.0 with a default, minimal installation.

Currently in Windows Server 2008 (Release Candidate 0) only classic web applications such as ASP and PHP are available in Server Core mode. The following IIS services are not available in Server Core mode:

  • IIS-NetFxExtensibility
  • IIS-ManagementConsole
  • IIS-ManagementService
  • IIS-LegacySnapIn
  • IIS-FTPManagement
  • WAS-NetFxEnvironment
  • WAS-ConfigurationAPI

In Server Core mode administration and configuration of IIS has to be done through the .config xml configuration files or the appcmd.exe command tool. Interfaces such as WMI and COM are also available, remote management is possible using MMC 3.0 and Snap-Ins.

Confirm the installation by copying or creating some .html web pages and put them in the root of the Inetpub folder.

Unattended installation

Unattended installation is a way of automating the installation, for consistent and automated installation of IIS 7.0. Automating the installation using unattended scripts is very useful if you need to deploy multiple web servers and want to make sure that each of the web servers is set up with identical components and services.

This is done differently than with Windows Server 2003. In Windows Server 2008 and Windows Vista the tool used for unattended scripts is called pkgmgr.exe. It’s the main component used during unattended installations and it allows you to install or uninstall from a command prompt or scripts. Pkgmgr.exe replaces sysocmgr.exe from Windows Server 2003.

To use pkgmgr.exe, make sure you have administrative privileges on the machine(s).

Run the following command directly from a command prompt or from within a script:

pkgmgr.exe /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ODBCLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-ClientCertificateMappingAuthentication;IIS-IISCertificateMappingAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;IIS-LegacyScripts;IIS-LegacySnapIn;IIS-FTPPublishingService;IIS-FTPServer;IIS-FTPManagement;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI

The above command installs IIS 7.0 with all the services available. Choose only the services required by your web applications.

The same command can be packed into an xml file and run pkgmgr.exe with the xml file as a parameter, also from a command prompt:

pkgmgr.exe /n:IIS7_unattend.xml

Here’s a sample of an IIS7_unattend.xml file, which installs IIS 7.0 with the default features:

<?xml version="1.0" ?>
<unattend xmlns="urn:schemas-microsoft-com:unattend"
   <package action="configure">
    <selection name="IIS-WebServerRole" state="true"/>
    <selection name="WAS-WindowsActivationService" state="true"/>
    <selection name="WAS-ProcessModel" state="true"/>
    <selection name="WAS-NetFxEnvironment" state="true"/>
    <selection name="WAS-ConfigurationAPI" state="true"/>

It’s very important that the Windows build version within the xml file (version="6.0.6001.16659") is the full version number of the OS, otherwise the xml file won’t work.

To get the current build number, open properties of the regedit.exe file:

Figure 6: Regedit.exe properties

The build version needed is the Product version listed above.

For more information about installing IIS 7.0 unattended or about the xml syntax used by unattended installations, see the Microsoft IIS website: www.iis.net.

IIS on Windows Vista

IIS 7.0 is also available on Windows Vista, with almost all the features of the full blown IIS 7.0.

Installing IIS 7.0 on Windows Vista is a little different than installing IIS 6.0 on Windows XP, but it’s still pretty straightforward.

You can install IIS via:

Control Panel – Programs and Features – Turn Windows features on or off (found in the task pane).

Select the “Internet Information Services” as show below and go through the dialog boxes.

Figure 7: Windows Features and the selected IIS Features

IIS 7.0 is now installed with a default configuration on your Windows Vista. Confirm that it works using http://localhost.

Figure 8: Default website

Use the Internet Information Services Manager to manage and configure IIS.

Figure 9

If you want to use ASP, ASP.NET or even PHP, install the modules needed to host these pages, this can be done during the install of IIS or afterwards.

IIS 7.0 can also be installed unattended on Windows Vista, as described earlier.