InstallationSingle Server Deployment

Single Server Deployment

Configure IIS

Now that the web application is in place, it can be connected to IIS, so it is exposed to the Internet. To do this, create a new website in IIS: 


Creating a New Website in IIS 

  • Give an appropriate description to the website, select the IP address and domain names, which will run the Sana Commerce solution, and map the website's home directory to the frontend directory of the Sana Commerce solution on the file system (see the 'Install the Web Applications' chapter);
  • Select the option 'Allow anonymous access to this Web site' on the 'Web Site Home Directory' step in the Web Site Creation Wizard when you want the website to be publicly available;
  • Select only the 'Read' option on the 'Web Site Access Permissions' step;
  • Click right on the newly created website, select 'New' and select 'Virtual directory'. Choose 'Backoffice' as name (or a different name, if preferred), select only 'Read rights' and map the home directory to the backoffice directory of the Sana Commerce solution in the file system (see the 'Install the Web Applications' chapter);
  • Create a new application pool by clicking right on the 'Application pool' folder, select 'New > Application Pool'. Give the application pool an appropriate name and leave the 'Application pool settings' set to 'Use default settings for new application pool'. By default the application pool identity is set to 'Network service' (in order to check this select 'Properties' of your application pool, open the 'Identity' tab and check the value in the 'Predefined' drop-down list). Change it to 'Configurable' and specify the SC_Webuser;


    Specifying SC_Webuser as the Application Pool Identity
 
If you use IIS 7, you should select 'Classic' mode in the 'Managed pipeline mode' dropdown during the creation of the new application pool. In this mode, the server will continue to route requests for managed code through 'Aspnet_isapi.dll', processing requests the same way, as if the application was running in IIS 6.0. You can also select 'Integrated' mode (in this mode the server will use the integrated, request-processing pipelines of IIS and ASP.NET to process the request), but in this case you will have to convert the 'web.config' which is not recommended. 
 
 
Selecting 'Classic' Mode in IIS 7 
 
Below you can find the IIS7 components which at least have to be installed.
More information for users of IIS 7.0 about can be found here: Available Role Services in IIS 7.0
More information for users of IIS 7.5 about can be found here: Available Web Server (IIS) Role Services in IIS 7.5
In order to see the installed components go to 'Start->Administrative Tools->Server Manager->Roles Summary->Add Roles->Add Roles Wizard'.
 
Minimal Installed IIS 7 Components
  • Click right on the frontend website and select properties. Click the 'Home Directory' tab and select the newly created application pool in the application pool dropdown. 'Execute permissions' option determines the program execution level allowed for this site's resources. Select 'Scripts only', so that only scripts will be allowed to run, not executables. Select the newly created application pool in the 'Application pool' dropdown. Click the 'Apply' button to save these settings;

     
    Setting the Execute Permissions for the Starter Site Application Pool 

  •  Click the 'ASP.NET' tab and select '2.0.50727' in the 'ASP.NET Version' dropdown if it is not set by default. Click 'OK' to save your changes;

     
    Specifying the ASP.NET Version 

  •  Click right on the backoffice virtual directory on the frontend website and select 'Properties'. Click the 'Virtual directory' tab and click the 'Create' button next to the 'Application name' field.


    Setting the Execute Permissions for the Backoffice Application Pool

    If you use IIS 7, right click on the backoffice virtual directory, select 'Convert to Application' and in the 'Add Aplication' window select the created application pool.

By default the request without extension in IIS 6 and 7 is not handled by ASP.NET (for example: www.mywebshop.com\promotion). The request to images is not handled by ASP.NET also. Therefore the wildcard must be configured.

The wildcard must be configured for each website and for the backoffice.

To add a wildcard application mapping to a web server or website:

  • In IIS Manager, expand the local computer, expand the 'Web Sites' folder, right-click on the website or virtual directory that you need, and then click 'Properties';
  • Click on the appropriate tab 'Home Directory';
  • In the 'Application settings' area click on 'Configuration', and then click on the 'Mappings' tab;


    Mappings Tab to Install a Wildcard Application Map

To install a wildcard application map do the following:

  • On the 'Mappings' tab click the 'Insert' button;


    Adding an Application Extension Mapping

  • Type the path to the DLL in the 'Executable' field:
    c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll

    If 64-bit version of Windows is installed on the server then type the path to the DLL in the 'Executable' field:
    c:\windows\microsoft.net\framework64\v2.0.50727\aspnet_isapi.dll
    Make sure that in the <system.webServer> node of the backoffice and frontend 'web.config' files the value for the 'requireAccess' attribute is set to "None":

    <system.webServer>
      <handlers>
              <add name="wildcard sc" path="*" verb="*" type="" modules="IsapiModule"
                   scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll"
                   resourceType="Unspecified" requireAccess="None"
                   preCondition="classicMode,runtimeVersionv2.0,bitness64" />
      </handlers>
    </system.webServer>

  • Restart the application pool for a website.
InstallationSingle Server Deployment