CONFIGURING WINDOWS SERVER MIS 424 Professor Sandvig Overview
- Slides: 58
CONFIGURING WINDOWS SERVER MIS 424 Professor Sandvig
Overview • In this exercise you will: 1. Log onto Windows Server 2. Create a new application pool 3. Create a new web application 4. Open Sql Server Management Studio 5. Create a new Sql Server database 6. Create a new Sql Server user 7. Assign the user to the database 8. Read your database from web page
Steps • You will be provided with an instance of Windows Server 2016 hosted by on Amazon EC 2 cloud • The next several slides display how an instance is launched from Amazon’s console. These steps have already been done for you.
Amazon Web Service Console
Select instance type
Instance • Each instance is assigned a public IP address • The following slide shows the instance management page
Instance Management
Security Group • Instance security group must be modified to allow inbound request from port 80
Instance Management • Next step is to get the instance password
Instance management
Password • Amazon generates a private key for each account. • The private key is used to decrypt the password (next slide)
Password • Ta-da!
Login • Login to your instance using Remote Desktop • Your Public DNS and password are on the next page
Login Passwords Username: Administrator Person Kalen Alex Kevin Dillon Public DNS ec 2 -35 -173 -220101. compute 1. amazonaws. com ec 2 -54 -159 -157200. compute 1. amazonaws. com ec 2 -34 -203 -215 -7. compute 1. amazonaws. com ec 2 -54 -174 -155155. compute 1. amazonaws. com Password (cut & paste) (Me&M$@Gd. ED 7!iz@jqwi&RAS; B% LVWT o*K%@bs. JX)x. Vl. YTAD 2 mfd. =W MBqlyup. L 9 J? JCOu 3 LQid? 89 Md. Hae 3 m. Zr Jb 83 Ep 3( %g. Rjf. Bquh. A? t. K$LBYFdzn 5 Gm HEzi. NKD!
Server Configuration • The next two steps change server settings to improve usability
View IIS Default • By default Windows hides file extensions • Developers need to see file extensions. • In Windows Explorer select “Local Disk C”, View tab, Options, View, uncheck “Hide extensions…” • Change folder view to show file extensions
Turn off IE Enhanced Security • Open Server Manager, select “Local Server, turn off IE Enhanced Security for Administrators.
Install IIS • By default only minimal server services are installed (to minimize attach surface) • Open Server Manager, select Local Server, Manage, Add Roles and Features
Install IIS • Click each menu option down to “Server Roles” • Select “Web Server (IIS)
Install IIS • Check ASP. NET 4. 6 and others as shown below
Task Manager • IIS takes a few minutes to install • Start Task Manager to monitor progress
Install IIS • Confirm IIS installation by checking for a new folder named “inetpub/wwwroot” • wwwroot is the web server root folder • Iisstart. htm is the default web page
Permissions • Navigate to wwwroot and check folder permissions. • IIS_IUSERS is the user assigned to anonymous internet users. • It is a limited account with only read and execute permissions
View default web page • Open a browser on your local machine and view the default IIS web page • URL is public IP of your instance (on server desktop)
Make new default web page • Copy iisstart. htm to default. htm • Use Notepad to edit default. htm <body> <div id="container"> <h 1>Hello world!</h 1> </div> </body>
Create a ASP. NET Application • You will now create a new ASP. NET application. • Create a new folder named mis 424 Application
Create ASP. NET Application • Open IIS Manager • Start, Administrative Tools, IIS Manager
Create a new application pool • Create an application pool for your application
New Application pool • Give the application pool the same name as the application folder
Create new Application • In IIS manager right click on your new folder and convert it to an application • Select your new application pool
Test New Application • In the next step you will create a simple. aspx page that displays information about your application.
Test your application • Use Notepad to create a file default. aspx with the following code: <%@ Page Trace="true" Language="C#" %> <script runat="server"> void page_load() { lbl. Message. Text = ". NET Version: " + System. Environment. Version. To. String() + " Application Pool: " + Request. Server. Variables["APP_POOL_ID"] ; } </script> <html> <head> <title>ASP. NET Test</title> </head> <body> <h 2 style="text-align: center"> <asp: label id="lbl. Message" runat="server" /> </h 2> </body> </html>
View new file in local browser
Database • You have now configured an ASP. NET application! • The next step is to create a new SQL server database and link to it from your web application.
Create a new database • Open Sql Server Management Studio on the server (under SQL Server Tools) • Check host/server name (starts with ec 2 amaz)
Create new database • Name your new database “Retail. Store”
Add a new table (as shown) cust. ID is the primary key and identity field
Create new table • • • You will be connecting an. aspx page to your database so make sure that all the names match the sample Sql Server is case sensitive Save the table with name tbl. Customers
Add some data (3+ rows)
Permissions • Permissions are needed to access the database • You will create a new user named webguest • For security reasons webguest has only limited permissions • In the following steps you will: 1. Configure Sql Server to allow Sql server authentication 2. create a new Sql Server user 3. Assign user permissions to your database
Allow Sql Server Authentication • Using Sql Server Management Studio right-click on the database server (top folder) and select Properties • Click on Security • Change authentication mode
Restart Database • In Management Studio right- click on server and select restart
Add new Sql Server user
Add Sql user • Username: webguest • Password: guest 22 • Turn off “enforce password policy”
Assign user to Retail. Store database • Open Security • Right-click “Users” • Select “New User
Assign Roles on Database • Username and Login name is “webguest” • Click default schema • Click browse • Check db_datareader
Assign Permissions on table • Right-click tbl. Customers and select Properties • Select Permissions • Click search, click browse, select webguest • Click “Select” permission
Test login • Create a second connection to database in SSMS. • Login to server using Sql Server Authentication (webguest / guest 22) • You now have two connections to database. One as an admin, one as webguest
Test permissions • Try to view, add, update, and delete data • Try to add a new table
Connect Web to Database • In the mis 424 Application folder create a new file crud. aspx using this code • Replace data source with your database name from Sql Server Studio <%@ Page Language="C#" %> <!DOCTYPE html> <head runat="server"> <title>Read Sql Server</title> <style type="text/css"> table {margin: 10 px auto; background-color: #fff; } td {padding: 5 px; } body {background-color: #ccc; } </style> </head> <body> <form id="form 1" runat="server"> <div style="text-align: center; "> <h 1>Read Sql Server</h 1><hr /> <asp: Grid. View ID="Grid. View 1" runat="server" Auto. Generate. Columns="False" Data. Key. Names="cust. ID" Data. Source. ID="Sql. Data. Source 1"> <Columns> <asp: Command. Field Show. Edit. Button="True" /> <asp: Bound. Field Data. Field="cust. ID" Header. Text="cust. ID" Insert. Visible="False" Read. Only="True" Sort. Expression="cust. ID" /> <asp: Bound. Field Data. Field="name" Header. Text="name" Sort. Expression="name" /> </Columns> </asp: Grid. View> <asp: Sql. Data. Source ID="Sql. Data. Source 1" runat="server" Connection. String="Data Source=ec 2 amaz-ide 9 no 7; Initial Catalog=Retail. Store; User ID=webguest; Password=guest 22" Delete. Command="DELETE FROM [tbl. Customers] WHERE [cust. ID] = @cust. ID" Insert. Command="INSERT INTO [tbl. Customers] ([name]) VALUES (@name)" Provider. Name="System. Data. Sql. Client" Select. Command="SELECT [cust. ID], [name] FROM [tbl. Customers]" Update. Command="UPDATE [tbl. Customers] SET [name] = @name WHERE [cust. ID] = @cust. ID"> <Delete. Parameters> <asp: Parameter Name="cust. ID" Type="Int 32" /> </Delete. Parameters> <Insert. Parameters> <asp: Parameter Name="name" Type="String" /> </Insert. Parameters> <Update. Parameters> <asp: Parameter Name="name" Type="String" /> <asp: Parameter Name="cust. ID" Type="Int 32" /> </Update. Parameters> </asp: Sql. Data. Source> </div> </form> </body> </html>
Modify Connection String • Edit Data Source to match your Host: • Connection. String="Data Source=ec 2 amaz-bjlfrve
Test CRUD
Email links • Email your Amazon cloud links to Professor Sandvig: 1. default. aspx 2. Crud. aspx
Summary • Today you have: 1. Logged onto Windows Server 2. Created a new application pool 3. Created a new web application 4. Used Sql Server Management Studio to: a. b. c. d. 5. Create a new database Create a new user Assign the user to the database Log in as the new user Read your database from an. aspx application
Other things you could do: • Setup a CMS • Download Microsoft Web Platform Installer • Select a CMS • Wordpress takes about 10 minutes to install
Other things you could do: • Apply for a AWS $35 student credit • Copy your MIS 324 / MIS 424 assignments to AWS Elastic Beanstalk
Say adiós to your instance • Professor Sandvig will terminate your instance. • AWS charges about $0. 704 per hour for this instance type
Finished
- Axel sandvig
- Rosemarie rizzo parse theory application
- Otv configuration
- Dansguardian squid
- Configure a network operating system
- Configuring a network operating system
- Packet tracer configuring multiarea ospfv2
- Promotion from associate professor to professor
- Vision en mi proyecto de vida
- Son los padres de mis tios
- Mis mai a mis tachwedd
- Mis mai a mis tachwedd
- Cuales son mis creencias
- Portaria interministerial 424
- Mathews v. eldridge balancing test
- Nmos inverter with depletion load
- Seurp
- Econ 424
- Ece 424
- Ece 424
- What is qt
- Arinc 424 waypoint format
- A small catchment of area 150 ha
- Rn 424
- Ece 424
- Ece 424
- Ece 424
- Udhcp
- 424 waupelani drive
- Windows server 2008 ip address management
- Small business server 2010
- Microsoft windows small business server 2011 essentials
- Windows small business server 2003
- Windows server 2000 caracteristicas
- Windows multipoint server 2012
- Windows server migration tools
- Windows storage server 2003
- Cisco secure access control server for windows
- Windows 7 codename
- Networking with windows server 2016
- Net server 2003
- Sql server 2017 windows 7
- Nouveauté windows server 2016
- Windows server 2012 r2 essentials
- Dlna server windows 10
- Microsoft windows storage server 2003
- Windows 2003 sp
- Windows server 2008
- Windows compute cluster server
- Windows server 2003 developer
- Eol windows server 2012
- Windows server 2003 eos
- Wins server windows 10
- Terminal server printer
- Wsfc sql server
- งช
- Lcow windows server 2019
- Windows server 2012 essentials launchpad download
- Bento windows