Top Banner
Installing sylib By, Tolga Ciftci
24

Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Dec 22, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Installing sylib

By,

Tolga Ciftci

Page 2: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Main Aims

• Installing the website with the setup file– With SQL Express Server and user

instancing.

Page 3: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Setup files

– 2 setup files for 2 setup types.– Precompiled setup

• The sources are precompiled.• No source files for web pages.• In folder “sylibPrecompSetup”• Advantages

– Making It Harder for Prying Eyes

• Disadvantages– Harder to update the site– Preparing an updateable precompiled web site is

possible. But this is not updateable.

Page 4: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Setup files

• Setup– Not precompiled– In folder “sylibSetup”– Advantages

• Easier to prepare• Can change files in place with notepad.

– Disadvantages• Less secure

Page 5: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Setup files

• They are installed the same way

Page 6: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

About User Instances and SQLExpress

• Gives “database admin rights” to non-admin processes/users for database files that they can access.– Asp.Net web application is not admin; default

user name “Network Service” in sy machines.

• An instance of SQL Express server with client’s rights and name created.– See

http://msdn2.microsoft.com/en-us/library/bb264564.aspx for a discussion

Page 7: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

About User Instances and SQLExpress

• The web site expects an SQL Express server instance with “user instance” option enabled and with instance name SQLExpress.– Default installation of SQL Express has this

instance name.– Can check by trying to connect with “SQL

Server Management Studio”. • Express edition of management studio will also

work.

Page 8: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Connecting to SQL Express

• Open Management studio– Enter “.\SQLExpress”

in server name. • “.\” server addres.

Means localhost• SQLExpress: Server

instance name

– Authentication is “Windows Authentication”

• Press connect

Page 9: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Management Studio

Object Explorer

SQL query editor connected to (local)\

SQLExpress

Execute button

Results window

Page 10: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Checking “User Instances” option

• In Management Studio object explorer window, right click on the server name and choose new query.

• In the SQL editor window write “sp_configure 'user instances enabled‘”

• Press execute button

Page 11: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Checking “User Instances” option

• If the results window shows a row like the one on the left, “user instances” is enabled.

• In the other case execute– sp_configure 'user

instances enabled','1‘;

RECONFIGURE;

GO

• Change “1” with “0” to disable

Page 12: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Checking “User Instances” option

• For Summer 2007 SQLServer express seems to be installed correctly on sy machines.

• You don’t need to check this for summer 2007

Page 13: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Installing the site

• Double click on the setup exe program

• SylibSetup dialog appears.

• Click “Next >” button

Page 14: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Installing the site

• On the next windows• Choose site• In the virtual directory

write a meaningful name that wont clash with other people using the same machine– For example sylibsy01a– I used sylibteam2007 in

this example.

• Click “Next >” button

Page 15: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Installing the site

• Wait for completion of setup

• Click on the “Close” button.

Page 16: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Checking installation directory

• Go to “c:\Inetpub\wwwroot\<the virtual directory name from setup>– In our example this will be “c:\Inetpub\

wwwroot\sylibteam2007”

• Now we can check whether site works or not– Browse to “http://localhost/<the virtual

directory name from setup>”

Page 17: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Possible errors

• In some sy machines the .Net 2.0 is not registered in the ISS.– This gives an error that says “Parser error message:

Unrecognized attribute xmlns” in web browser.– See http://msdn2.microsoft.com/en-us/asp.net/aa336670.aspx

for an explanation and solution– Basically execute aspnet_regiis executable from: %windows root

directory%\Microsoft.NET\Framework\%version of the .NET Framework%\aspnet_regiis -r

• In sy machines this is “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ aspnet_regiis -r”

– The “-r” option associates all web applications with ASP.Net 2.0. if this is not OK for your setup use “-ir” option. You can look at http://weblogs.asp.net/owscott/archive/2006/01/26/436607.aspx

Page 18: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Changing permission of database files

• Since SQL Server express uses user instancing while attaching the files, the process attaching the database files need to have read-write access to the files.– The process attaching DB files is the ISS

application pool which uses identity “Network Service”

– Giving “Network Service” read-write access to these files solves the “read-only database” file problem.

Page 19: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Changing Permissions of DB files

• The database files are under “App_Data” subfolder of the application folder.– The file extensions are;

“.mdf” and “.ldf”.

• Select all of these files. – Right click and choose

properties – In the upcoming properties

dialog go to security tab

Page 20: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Changing Permissions of DB files(Continued)

1. Press Add button under “Groups or User names” list

2. “Select users or groups” dialog box comes up.a. In the name field, write

“network service”

b. For the location field, choose the computer you are connected to.

c. Click OK.

1

2

a

b

2

b

a

2

b

a

2

b

Page 21: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Changing Permissions of DB files

• Give read,write and execute rights to “Network Service”– Execute right may not

be needed.

• Only “Administrators” and “Network Service” in the users list seems enough.

Page 22: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Extra Information

• In vista the installation program may not work right out of the box. This maybe due to the fact that VBScript is not registered. – See

http://blogs.msdn.com/fzandona/archive/2007/03/30/wm-6-sdk-install-issue-common7-ide-projecttemplates.aspx for a similar issue and possible solution. We do not recommend or reject this solution.

Page 23: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

Extra Information

• At times you may want to move/copy/delete the database file and not able to do it due to the fact they are used by another process (probably SQL Server Express)– Waiting for some amount of time or restarting the

machine may work.– Process explorer from Microsoft maybe helpful:

http://www.microsoft.com/technet/sysinternals/utilities/ProcessExplorer.mspx

• Note that closing file handles using this tool may cause some data corruption or damage the DB files.

Page 24: Installing sylib By, Tolga Ciftci. Main Aims Installing the website with the setup file –With SQL Express Server and user instancing.

References

• The references shown in this presentation are obtained by googling and are not necessarily from sources we know.