Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web...

24
Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 1 Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008 Table of Contents Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008 ........................ 1 Pre-requisites .................................................................................................................................. 2 Deprecated pre-requisites .......................................................................................................... 2 Creating a new LIMS schema from Database Scripts on SQL Server .............................................. 3 Creating a new LIMS schema from Database Scripts on Oracle ..................................................... 3 Configuring the WinLIMS Database for Integrated Security ........................................................... 3 Creating the Membership database on SQL Server ........................................................................ 4 Configuration of Membership Database for Trusted Security ........................................................ 7 Creating the Membership database on Oracle ............................................................................... 8 Deploying IIS 7.x on your web server .............................................................................................. 9 Verifying ASP.NET Role Service is installed on IIS ........................................................................... 9 Configuration of IIS........................................................................................................................ 10 Configuring the web site applications ....................................................................................... 10 Configuring Application Pool ..................................................................................................... 12 Configuring Connection Strings ..................................................................................................... 12 Installing SMTP .............................................................................................................................. 14 Configuring SMTP .......................................................................................................................... 14 Configuring IIS Remote Administration Tool (Optional) ............................................................... 18 SERVER-SIDE INSTALL ................................................................................................................ 18 CLIENT SIDE INSTALL ................................................................................................................. 20 Troubleshooting and Sanity Tests ................................................................................................. 24 Test 1: Is IIS and ASP.NET Feature installed and enabled? ....................................................... 24

Transcript of Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web...

Page 1: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 1

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008

Table of Contents

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008 ........................ 1

Pre-requisites .................................................................................................................................. 2

Deprecated pre-requisites .......................................................................................................... 2

Creating a new LIMS schema from Database Scripts on SQL Server .............................................. 3

Creating a new LIMS schema from Database Scripts on Oracle ..................................................... 3

Configuring the WinLIMS Database for Integrated Security ........................................................... 3

Creating the Membership database on SQL Server ........................................................................ 4

Configuration of Membership Database for Trusted Security ........................................................ 7

Creating the Membership database on Oracle ............................................................................... 8

Deploying IIS 7.x on your web server .............................................................................................. 9

Verifying ASP.NET Role Service is installed on IIS ........................................................................... 9

Configuration of IIS ........................................................................................................................ 10

Configuring the web site applications ....................................................................................... 10

Configuring Application Pool ..................................................................................................... 12

Configuring Connection Strings ..................................................................................................... 12

Installing SMTP .............................................................................................................................. 14

Configuring SMTP .......................................................................................................................... 14

Configuring IIS Remote Administration Tool (Optional) ............................................................... 18

SERVER-SIDE INSTALL ................................................................................................................ 18

CLIENT SIDE INSTALL ................................................................................................................. 20

Troubleshooting and Sanity Tests ................................................................................................. 24

Test 1: Is IIS and ASP.NET Feature installed and enabled? ....................................................... 24

Page 2: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 2

Pre-requisites

Microsoft IIS 7.0 or 7.5

ASP.NET role service feature installed and enabled for IIS

Microsoft .NET Framework 4.0 – downloadable installer:

http://www.microsoft.com/download/en/details.aspx?id=17851 or using Web Platform

Installer: http://www.microsoft.com/web/gallery/install.aspx?appid=NETFramework4

SAP Crystal Reports runtime engine for .NET Framework 4 (use the 64 bit one):

http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp

STMP feature install for IIS (see “Installing SMTP” later in this document)

A database server running SQL Server 2005, SQL Server 2008, or Oracle 10g or later

Deprecated pre-requisites

Adobe SVG is deprecated and is no longer required for this application

Microsoft Chart Controls is now part of .NET 4.0

Crystal Reports 2008 for .NET.

Page 3: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 3

Creating a new LIMS schema from Database Scripts on SQL Server

Using Enterprise Manager, create a new database in the SQL Server and run the scripts in the

order described below:

SQLServer_Preamble.sql

SQLServer_New.sql

SQLServer_Views.sql

SQLServer_SPAT.sql

SQLServer_StaticData.sql

SQLServer_Postamble.sql Take note of the database name: __________________, you will need it later in this process.

Creating a new LIMS schema from Database Scripts on Oracle If you are intending to use Oracle as your LIMS database, separate installation instructions exist and can be provided upon request.

Configuring the WinLIMS Database for Integrated Security Open the database created in previous step, then click Security / Users then right click and click “New User…”

Click the […] next to Login Name then enter “[NT AUTHORITY\NETWORK SERVICE]” then Check Names then OK. This step assumes that the database and IIS server are on the same physical machine (or same

VM). If the database and IIS server are different machines, then there is “twist” to this install: you

must create the database user with fully qualified [machinename/username] syntax. It’s the

responsibility of your IT department to verify that this is technically feasible to do. Otherwise, you

must configure a user/password in your connection string, or you must use a single machine to run

IIS and the database.

Page 4: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 4

Copy and paste the Login Name into the User Name

Grant the following Roles to the user:

Click OK. Your database is now configured for Integrated Security and will allow WinLIMS to connect to the database without needing a Username or Password to be specified in the connection strings.

Creating the Membership database on SQL Server

Go to the folder: C:\Windows\Microsoft.NET\Framework\v2.0.50727\

And run: aspnet_regsql.exe

Or go to Start Run then type in:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe

Page 5: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 5

You will get the screen below. Click on NEXT:

Click in the first option box and then in the NEXT button

Select the SQL Server and select an Authentication type.

If you are running it locally on the server running SQL Server, you can pick Windows

Authentication, otherwise use SQL server authentication (run it using sa user).

Page 6: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 6

Set the membership database name (always create a new one, never install it in an existing

database). Click in the NEXT button.

Click in the NEXT button.

Take note of the database name, you will need it later in this process.

Close the window

Page 7: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 7

Configuration of Membership Database for Trusted Security This section assumes SQL Server 2008. SQL Server 2005 is similar but the steps may be slightly

different. In addition, if you want to use ANALYST rather than Trusted you can ignore this step,

however it’s recommended that you use Trusted Security as opposed to entering a user and

password in a connection string.

Start SQL Server Enterprise Manager and login using trusted security or a sa-level account.

Navigate to the Databases node and locate the database that you created in the previous step.

Open the treeview and local Security/Users node.

Add Login Name as NT AUTHORITY\NETWORK SERVICE and as User NETWORK SERVICE (the prefix

for Login Name is important)

Tick off the Roles for NETWORK SERVICE as:

aspnet_Membership_FullAccess

aspnet_Roles_FullAccess

aspnet_Profile_FullAccess

aspnet_Personalization_FullAccess

db_datareader

db_datawriter

Click OK

Repeat this and add the Login Name for NT AUTHORITY\LOCAL SERVICE and as User LOCAL

SERVICE and tick off the Roles as was done for NETWORK SERVICE. See the screenshot for more

clarification.

Page 8: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 8

Click OK

Close SQL Server Enterprise Manager.

Creating the Membership database on Oracle If you are intending to use Oracle as your LIMS database, separate installation instructions exist for creating the Membership database on SQL Express and can be provided upon request.

Page 9: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 9

Deploying IIS 7.x on your web server

This task is the responsibility of your IT department and is normally handled beforehand, however

we are documenting it here merely as a convenience.

To verify if your server is properly configured to run IIS, open a browser on the server you intend

to use as the IIS server and type in: http://localhost

If you see an error, you may not have ASP.NET installed or enabled, continue below. If you get an

IIS Welcome message, you may proceed to the next step

If you do not yet have IIS installed on your server, it’s recommended that you use the Web

Platform Installer to install IIS and all the features that ASP.NET requires. Link:

http://www.microsoft.com/web/downloads/platform.aspx

If you would prefer to use the UI on Windows Server, use these steps:

Click Start, point to Administrative Tools, and then click Server Manager.

Under Server manager click Roles node

In Roles Summary, click Add Roles

Use the Add Roles Wizard to add the Web server role.

On the Select Role Services page, note the preselected role services that are installed by

default, and then select the following additional role services: ASP.NET, .NET Extensibility,

Request Filtering, ISAPI and ISAPI Extensions.

On the Summary of Features to Install page, confirm your selections, and then click Install

On the Installation Results page, confirm that your installation of the Web Server (IIS) role

and required role services completed successfully, and then click Close

To verify that IIS installed successfully, type the following into a Web browser:

http://localhost (You should see the default IIS Welcome page).

Verifying ASP.NET Role Service is installed on IIS

This task is the responsibility of your IT department and is normally handled beforehand, however

we are documenting it here merely as a convenience.

This is normally enabled by default when installing IIS on your web server. However, we’ve

encountered instances where IIS was installed and ASP.NET Role Service has either not been

installed or is not enabled.

Page 10: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 10

To verify if your server is properly configured to run ASP.NET Role service on IIS, open a browser

on the server you intend to use as the IIS server and type in: http://localhost

If you see a welcome page and no errors you may proceed to the next step. If you do not see the

welcome page, and IIS installed, you may not have the ASP.NET features installed correctly, or you

may not have them enabled. Please follow these steps:

Click Start, point to Administrative Tools, and then click Server Manager.

Under Server manager click Roles node

In Roles Summary, click Add Roles Service

Verify that the following services are present and checked: ASP.NET, .NET Extensibility,

Request Filtering, ISAPI and ISAPI Extensions

Correct settings appear as follows:

Configuration of IIS

Open IIS. You can type the short cut below in the Start\Run box

%SystemRoot%\system32\inetsrv\InetMgr.exe

Configuring the web site applications

Open the site treeview like in the image below

Right click Default Web Site, select “Add Application”

Page 11: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 11

In the Add Application window:

Set an ALIAS for the application, such as winlims7

Select the AppPool named “ASP.NET 4.0 Classic”

Navigate to and select the physical path of the application

Once complete, the setting should look similar to the settings below:

Page 12: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 12

Configuring Application Pool

Click the ASP.NET 4.0 Classic AppPool and then click the link “Advanced Settings”

Make sure that:

.NET Framework version is v4.0

Enable 32-Bit Applications (under General) is set to False

Identity (under Process Model) is set to NetworkService (or LocalSystem).

CAUTION: if Identity is set to AppPoolIdentity, you may get an error: Login failed for user ‘IIS

APPPOOL\{AppPoolName}’.

Configuring Connection Strings

If IIS is not open, open IIS from Control Panel or type the short cut below in the Start\Run box

%SystemRoot%\system32\inetsrv\InetMgr.exe

Highlight the Application that you want to configure, and then click Connection Strings.

Page 13: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 13

This will display the connection strings that are pre-configured with the application.

It likely that you will need to change the database name or authentication credentials; if so click

Edit:

Use Trusted Connection (Windows Integrated Security) syntax whenever possible, and only add

User ID and Password when Trusted Connection is not an option.

Page 14: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 14

Note: these settings will be saved to the file localCs.config and not the web.config and appear

something like:

<add name="ConnectionStringLIMS" connectionString="Data Source=servername;Initial Catalog=winlimsdatabasename;Persist Security Info=True; Integrated Security=SSPI" providerName="System.Data.SqlClient"/> <add name="LocalSqlServer" connectionString="Data Source= servername;Initial

Catalog=membershipdatabasename;Integrated Security=SSPI" providerName="System.Data.SqlClient"/>

Installing SMTP

SMTP is not installed by default, it’s a separate “feature install” for IIS7.x

In start->administrative tools->server manager, go to features, select "add features", tick "smtp server" (if it is not already installed), choose to install the required "remote server admin tools"

Configuring SMTP

Open IIS. You can type the short cut below in the Start\Run box

%SystemRoot%\system32\inetsrv\InetMgr.exe

In the left side of the IIS screen, click in the computer name, then in the right side, double click

SMTP E-mail

Click on "Deliver e-mail to SMTP server"; check the "Use localhost" checkmark

Page 15: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 15

Go to Control Panel, Administrative Tools, then “Internet Information Services (IIS) 6.0 Manager”.

Note that this is 6.0 menu.

If you see an X on the Envelope icon next to SMTP Virtual Server, the service is stopped. Start it by

right clicking and clicking Start.

Page 16: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 16

Next, configure SMTP to be secure from SPAM relay by locking down the service. Right click the

SMTP Virtual Server then click Properties. Click the Access tab.

Click the Connection button and set the access to only allow local connections (127.0.0.1) as in the

picture below.

Page 17: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 17

Click OK.

Click the Relay button and set the access to only allow local connections (127.0.0.1) as in the

picture below.

Click OK twice.

Page 18: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 18

Configuring IIS Remote Administration Tool (Optional)

In order to manage IIS from a desktop (rather needing to run remote desktop on the IIS server)

you can review how install the optional feature Remote Admin from here:

http://www.iis.net/download/iismanager

http://learn.iis.net/page.aspx/158/remote-administration-for-iis-manager/

SERVER-SIDE INSTALL

To enable Remote Administration on IIS server, connect to the IIS Server (using remote desktop)

and launch IIS Management Console.

Click the Server node and locate the Management Service item in Management section, right click

it and click Open Feature.

An example setup (with Windows creds on, and IP addresses explicitly allowed all others denied) is

below:

Page 19: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 19

From this point, please consult this How To in order to configure your environment according to

local needs: http://learn.iis.net/page.aspx/158/remote-administration-for-iis-manager/

Next, go to Control Panel, Services and locate Web Management Service.

Page 20: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 20

Next, right click, click Properties, then Start the service. Finally, set the Startup setting to

Automatic (delayed) if you’d like this service to always be running (preferable).

Close Services.

CLIENT SIDE INSTALL

Once Web Admin is enabled on the server, you need to install the client side Remote

Administration on a Vista or Windows 7 workstation. Run Web PI from here on the workstation:

http://www.iis.net/download/IISManager

You may be prompted to download an exe initially in order to install Web PI if this is your first time

running the program.

When Web PI launched, click customize under the Web Server section:

On the next screen, go to the Management section and click Remote Admin Manager for IIS7.

Page 21: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 21

Click Install, then I Accept on the next screen, then allow the wizard to run to completion, then

Exit.

Launch InetMgr.exe on your workstation and you will see a new Menu under Connections:

Click on Connect to a Server.

Enter server name and login credentials:

Page 22: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 22

You might get a certificates warning. If you are sure you are connected to the right server you

may ignore and continue. If the connection is successful, you will be prompted to assign a name

for the connection (default is the server name you entered). Click Finish.

If you get a New Feature Available prompt such as this:

Page 23: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 23

You may tick off the features you’re interested in downloading and install them next. Click OK.

Once installation is complete, you should see your local web server as well as the new remote web

server you just connected to:

You can now manage IIS setting on the remote server without needing Remote Desktop access.

If you encounter any problems, please consult this how-to:

http://learn.iis.net/page.aspx/158/remote-administration-for-iis-manager/#01

Page 24: Deploying WinLIMS Web v7help.winlims.info/images/0/0e/Deploying_WinLIMS_Web...Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc Page 2 Pre-requisites

Deploying WinLIMS Web v7.36+ to a Windows 2008 x64 box with SQL Server 2008.doc

Page 24

Troubleshooting and Sanity Tests

Test 1: Is IIS and ASP.NET Feature installed and enabled?

In order to verify that IIS 7.x are installed on a web server and the and ASP.NET feature is enabled:

Go to the web server (not the client workstation) and open a browser.

Type http://localhost and see the IIS welcome page. If you have an error, you may not

have ASP.NET installed or enabled. Please see section Deploying ASP.NET on IIS.

END